fixed: calculating the size of the main window

now it looks good on MS Vista and when a user changes size of some
         widgets such as a border, font size, etc.
added:   spanish language to the setup (installer)
added:   the setup will remove mingwm10.dll if it exists in the program directory
added:   on display tab: we can select 'deg' 'rad' or 'grad' for calculating
         in such functions: sin,cos,tan,cot,asin,acos,atan,acot
added:   macro TTCALC_CONVERT if not defined there will not be a convert tab
         (the convert tab is not finished)
added:   a new icon with following dimensions: '48x48' '32x32' '16x16'
removed: parameter for gcc: -mthreads
         with -mthreads it is possible (on windows) to release some kind of
         'destructors' belonging to a thread when the specific thread exists
         (it prevents some kind of memory leaks)
         in the TTCalc when the second thread exists then there is the end
         of the program and we can not use '-mthreads'
removed: file TODO (I didn't use the file)


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@114 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2009-03-28 18:26:20 +00:00
parent 2ff2aebbee
commit ff62d833c9
35 changed files with 1077 additions and 942 deletions

165
CHANGELOG
View File

@ -1,69 +1,114 @@
Version 0.8.3 prerelease
* fixed: calculating the size of the main window
now it looks good on MS Vista and when a user changes size of some
widgets such as a border, font size, etc.
* changed: variables and functions are case-sensitive now, e.g.
'x' is not the same as 'X'
* changed: precision:
small - the same as previous
medium - 288 bits for the mantissa, 64 bits for the exponent
big - 864 bits for the mantissa, 128 bits for the exponent
previous were:
medium - 192 bits for the mantissa, 64 bits for the exponent
big - 288 bits for the mantissa, 96 bits for the exponent
* added: when a user presses CTRL+C then the result will be
copied into the clipboard (if the current control which
has a focus is not an edit control, or if it is an edit
but has no selection)
* added: when a user presses CTRL+V then the text from the clipboard
will be copied into the edit control
(the focus can be anywhere but it cannot be on another edit control)
* added: 'decimal point' option on the display tab
* added: variables and functions can have underline characters
in their names
* added: from TTMath 0.8.3: a short form of multiplication
(without the '*' character) e.g. '5y'
(it's used only if the second parameter is a variable
or function)
* added: 'remove trailing zeroes' option on 'display' tab
* added: new language: spanish
translation made by Alejandro S. Valdezate
alesanval at gmail dot com
* added: spanish language to the setup (installer)
* added: the setup will remove mingwm10.dll if it exists in the program
directory
* added: on display tab: we can select 'deg' 'rad' or 'grad' for calculating
in such functions: sin,cos,tan,cot,asin,acos,atan,acot
* removed: 'cut off last non valid digits' on 'rounding' option
on 'display' tab
Version 0.8.2 portable (2007.07.01): Version 0.8.2 portable (2007.07.01):
* added: the portable version of the program TTCalc * added: the portable version of the program TTCalc
it uses *.ini config file from the same folder where it uses *.ini config file from the same folder where
is the executable file, and it's much smaller in size is the executable file, and it's much smaller in size
(in the portable version there's only one kind (in the portable version there's only one kind
of precision and the program is packed with UPX - of precision and the program is packed with UPX -
the Ultimate Packer for eXecutables) the Ultimate Packer for eXecutables)
there are no other differences between version 0.8.1 and this one there are no other differences between version 0.8.1 and this one
Version 0.8.1 (2007.04.17): Version 0.8.1 (2007.04.17):
* changed: on win9x the configuration file is in a folder like: * changed: on win9x the configuration file is in a folder like:
"c:\windows\data application\ttcalc\" now "c:\windows\data application\ttcalc\" now
* changed: the program uses the TTMath 0.8.1 now * changed: the program uses the TTMath 0.8.1 now
* added: from TTMath 0.8.1: * added: from TTMath 0.8.1:
root(x, index), bitand(x,y), bitor(x,y), bitxor(x,y) root(x, index), bitand(x,y), bitor(x,y), bitxor(x,y)
/band(x,y), bor(x,y), bxor(x,y)/ /band(x,y), bor(x,y), bxor(x,y)/
asinh(x), acosh(x), atanh(x), acoth(x) /atgh(x), actgh(x)/ asinh(x), acosh(x), atanh(x), acoth(x) /atgh(x), actgh(x)/
* changed: from TTMath 0.8.1: calculations are much faster now * changed: from TTMath 0.8.1: calculations are much faster now
especially the factorial() function especially the factorial() function
* changed: from TTMath 0.8.1: the way of parsing operators * changed: from TTMath 0.8.1: the way of parsing operators
Version 0.8.0 (2007.04.02): Version 0.8.0 (2007.04.02):
* added: the del key deletes a variable or a function now * added: the del key deletes a variable or a function now
(if the focus is on the list) (if the focus is on the list)
* added: a user can change the names of variables or functions now * added: a user can change the names of variables or functions now
* changed: the program uses TTMath 0.8.0 now * changed: the program uses TTMath 0.8.0 now
* added: functions: from TTMath 0.8.0: * added: functions: from TTMath 0.8.0:
DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec), DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec),
RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x), RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x),
Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/ Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/
* added: a help * added: help
* changed: from TTMath 0.8.0: * changed: from TTMath 0.8.0:
renamed: CTan() into Cot() or Ctg() renamed: CTan() into Cot() or Ctg()
renamed: ACTan() into ACot() or ACtg() renamed: ACTan() into ACot() or ACtg()
Factorial() has a history log now (it can remember last Factorial() has a history log now (it can remember last
10 calculated values) 10 calculated values)
* fixed: the vertical size of the main window when a user uses a different * fixed: the vertical size of the main window when a user uses a different
size of the window caption (especially under the Windows XP Luna) size of the window caption (especially under the Windows XP Luna)
* fixed: on Windows 9x: the program hung when a user clicks on a control * fixed: on Windows 9x: the program hung when a user clicks on a control
on the first tab on the first tab
* fixed: when a user started navigating from the keyboard the program showed * fixed: when a user started navigating from the keyboard the program showed
a wrong variable or a funtion in the edit dialog a wrong variable or a funtion in the edit dialog
Version 0.7.3 (2007.03.08): Version 0.7.3 (2007.03.08):
* added: the program shows some kind of errors itself * added: the program shows some kind of errors itself
* added: checking whether an user has inserted a correct value of a variable * added: checking whether an user has inserted a correct value of a variable
or a function or a function
* fixed: navigation from the keyboard * fixed: navigation from the keyboard
* changed: the esc key selects the entire input text now (in the input edit) * changed: the esc key selects the entire input text now (in the input edit)
* added: a test when the program is being starded which checks if the * added: a test when the program is being starded which checks if the
coordinates of the main window actually pointing at the valid area (for coordinates of the main window actually pointing at the valid area (for
example when someone took his configuration file into a new computer and example when someone took his configuration file into a new computer and
the new computer has a smaller screen) the new computer has a smaller screen)
Version 0.7.2 (2007.02.28): Version 0.7.2 (2007.02.28):
* added buttons Sgn and Mod * added: buttons Sgn and Mod
* the button 'err' is active when there's actually an error now * changed: the button 'err' is active when there's actually an error now
* added buttons: ASin, ACos, ATan, ACTan * added: buttons: ASin, ACos, ATan, ACTan
* fixed: the program didn't save the current language into the configuration file * fixed: the program didn't save the current language into the configuration file
* fixed: the second thread didn't read the main window correctly and it caused * fixed: the second thread didn't read the main window correctly and it caused
small problems when an user was typing into the first edit control small problems when an user was typing into the first edit control
Version 0.7.1 (2007.02.08): Version 0.7.1 (2007.02.08):
* added a button 'err' (error) on the first tab * added: button 'err' (error) on the first tab
* the input edit can have 2048 characters now * changed: the input edit can have 2048 characters now
* added remembering the vertical size into the config file * added: remembering the vertical size into the config file
* fixed a problem with the 'tab' key * fixed: a problem with the 'tab' key
* added a message 'Calculating...' when an user clicks on the 'err' button * added: a message 'Calculating...' when an user clicks on the 'err' button
during calculating something during calculating something

View File

@ -1,4 +1,4 @@
Copyright (c) 2006-2007, Tomasz Sowa Copyright (c) 2006-2009, Tomasz Sowa
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

38
README
View File

@ -1,19 +1,19 @@
TTCalc TTCalc
TTCalc is a mathematical calculator. It has a nice user interface, TTCalc is an open source mathematical calculator. It features arithmetical
formulas for calculating can be inserted by using a keyboard or a mouse. functions, trigonometric functions, inverse trigonometric functions,
The result is automatically shown in a second window without using any hyperbolic functions, inverse hyperbolic functions, logical operators,
additional keys such as 'equal'. The program possess trigonometric logarithms, functions for converting between degrees and radians and
functions, inverse trigonometric functions, hyperbolic functions, so on. Additionally the program allows a user to define his own
logical operators, logarithms, functions for converting between degrees variables and functions.
and radians and so on. Additionally the program allows the user to
define his own variables and functions. Calculations are performed by The program possess an easy to use interface. Calculations are performed
using floating point numbers with three kind of precision, the biggest by using floating point numbers with three kind of precision, the biggest
has 288 bits for its mantissa and 96 bits for its exponent that is has 864 bits for its mantissa and 128 bits for its exponent that is about
about 2.551...e+11925026709067095507636213441 with 85 valid decimal 6.7....e+51217599719369681875006054625051616609 with 258 valid decimal digits.
digits. The program independently allows to insert and display values TTCalc independently allows to insert and display values with the base
with the base (radix) from two to sixteen. (radix) from two to sixteen.
Author: Tomasz Sowa <t.sowa AnTispam slimaczek.pl> Author: Tomasz Sowa <t.sowa AnTispam slimaczek.pl>
Project page: http://sourceforge.net/projects/ttcalc Project page: http://ttcalc.sourceforge.net/
Licence: BSD (open source) Licence: BSD (open source)

6
TODO
View File

@ -1,6 +0,0 @@
TODO TTCalc
===========

View File

@ -1,208 +1,208 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - arithmetic functions</title> <title>TTCalc - arithmetic functions</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="ln"> <param name="Keyword" value="ln">
<param name="Keyword" value="log"> <param name="Keyword" value="log">
<param name="Keyword" value="exp"> <param name="Keyword" value="exp">
<param name="Keyword" value="sin"> <param name="Keyword" value="sin">
<param name="Keyword" value="cos"> <param name="Keyword" value="cos">
<param name="Keyword" value="tan"> <param name="Keyword" value="tan">
<param name="Keyword" value="tg"> <param name="Keyword" value="tg">
<param name="Keyword" value="cot"> <param name="Keyword" value="cot">
<param name="Keyword" value="ctg"> <param name="Keyword" value="ctg">
<param name="Keyword" value="asin"> <param name="Keyword" value="asin">
<param name="Keyword" value="acos"> <param name="Keyword" value="acos">
<param name="Keyword" value="atan"> <param name="Keyword" value="atan">
<param name="Keyword" value="atg"> <param name="Keyword" value="atg">
<param name="Keyword" value="acot"> <param name="Keyword" value="acot">
<param name="Keyword" value="actg"> <param name="Keyword" value="actg">
<param name="Keyword" value="sinh"> <param name="Keyword" value="sinh">
<param name="Keyword" value="cosh"> <param name="Keyword" value="cosh">
<param name="Keyword" value="tanh"> <param name="Keyword" value="tanh">
<param name="Keyword" value="tgh"> <param name="Keyword" value="tgh">
<param name="Keyword" value="coth"> <param name="Keyword" value="coth">
<param name="Keyword" value="ctgh"> <param name="Keyword" value="ctgh">
<param name="Keyword" value="asinh"> <param name="Keyword" value="asinh">
<param name="Keyword" value="acosh"> <param name="Keyword" value="acosh">
<param name="Keyword" value="atanh"> <param name="Keyword" value="atanh">
<param name="Keyword" value="atgh"> <param name="Keyword" value="atgh">
<param name="Keyword" value="acoth"> <param name="Keyword" value="acoth">
<param name="Keyword" value="actgh"> <param name="Keyword" value="actgh">
<param name="Keyword" value="degtodeg"> <param name="Keyword" value="degtodeg">
<param name="Keyword" value="degtorad"> <param name="Keyword" value="degtorad">
<param name="Keyword" value="radtodeg"> <param name="Keyword" value="radtodeg">
<param name="Keyword" value="sqrt"> <param name="Keyword" value="sqrt">
<param name="Keyword" value="root"> <param name="Keyword" value="root">
<param name="Keyword" value="factorial"> <param name="Keyword" value="factorial">
<param name="Keyword" value="abs"> <param name="Keyword" value="abs">
<param name="Keyword" value="sgn"> <param name="Keyword" value="sgn">
<param name="Keyword" value="mod"> <param name="Keyword" value="mod">
<param name="Keyword" value="int"> <param name="Keyword" value="int">
<param name="Keyword" value="round"> <param name="Keyword" value="round">
<param name="Keyword" value="ceil"> <param name="Keyword" value="ceil">
<param name="Keyword" value="floar"> <param name="Keyword" value="floar">
<param name="Keyword" value="max"> <param name="Keyword" value="max">
<param name="Keyword" value="min"> <param name="Keyword" value="min">
<param name="Keyword" value="builtin functions"> <param name="Keyword" value="builtin functions">
<param name="Keyword" value="sum"> <param name="Keyword" value="sum">
<param name="Keyword" value="avg"> <param name="Keyword" value="avg">
</object> </object>
</head> </head>
<body> <body>
<h1>Arithmetic functions</h1> <h1>Arithmetic functions</h1>
<p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p> <p><strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.</p>
<dl> <dl>
<dt>ln(x)</dt> <dt>ln(x)</dt>
<dd>This function calculates the natural logarithm of x,<br>e.g. ln(123)=4.812...</dd> <dd>This function calculates the natural logarithm of x,<br>e.g. ln(123)=4.812...</dd>
<dt>log(x; base)</dt> <dt>log(x; base)</dt>
<dd>This function calculates the logarithm of x with a base equal 'base'<br>log(123; 4)=3.471...</dd> <dd>This function calculates the logarithm of x with a base equal 'base'<br>log(123; 4)=3.471...</dd>
<dt>exp(x)</dt> <dt>exp(x)</dt>
<dd>This function calculates the exponent of x<br>exp(20)=e^20=485165195.409...</dd> <dd>This function calculates the exponent of x<br>exp(20)=e^20=485165195.409...</dd>
<dt>sin(x)</dt> <dt>sin(x)</dt>
<dd>This function returns the sine of x.<br>For example sin(0.8)=0.717...<br>The argument x is in radians, if you want to calculate <dd>This function returns the sine of x.<br>For example sin(0.8)=0.717...<br>The argument x is in radians, if you want to calculate
with degrees use the degtorad(x) function first e.g. sin(degtorad(30))=0.5 calculates the sine of 30 degrees.</dd> with degrees use the degtorad(x) function first e.g. sin(degtorad(30))=0.5 calculates the sine of 30 degrees.</dd>
<dt>cos(x)</dt> <dt>cos(x)</dt>
<dd>Cosine of x<br>cos(1.3)=0.267...<br>The argument x is in radians.</dd> <dd>Cosine of x<br>cos(1.3)=0.267...<br>The argument x is in radians.</dd>
<dt>tan(x) or tg(x)</dt> <dt>tan(x) or tg(x)</dt>
<dd>Tangent of x<br>tan(3.6)=0.493...<br>The argument x is in radians.</dd> <dd>Tangent of x<br>tan(3.6)=0.493...<br>The argument x is in radians.</dd>
<dt>cot(x) or ctg(x)</dt> <dt>cot(x) or ctg(x)</dt>
<dd>Cotangent of x<br>cot(2.3)=-0.893...<br>The argument x is in radians.</dd> <dd>Cotangent of x<br>cot(2.3)=-0.893...<br>The argument x is in radians.</dd>
<dt>asin(x)</dt> <dt>asin(x)</dt>
<dd>Inverse sine (arc sine) of x<br>e.g. asin(0.7)=0.775...<br>The result is in radians. If you want the result to be in degrees use <dd>Inverse sine (arc sine) of x<br>e.g. asin(0.7)=0.775...<br>The result is in radians. If you want the result to be in degrees use
radtodeg function e.g. radtodeg(asin(0,5))=30</dd> radtodeg function e.g. radtodeg(asin(0,5))=30</dd>
<dt>acos(x)</dt> <dt>acos(x)</dt>
<dd>Inverse cosine (arc cosine) of x<br>acos(0.9)=0.451...<br>The result is in radians.</dd> <dd>Inverse cosine (arc cosine) of x<br>acos(0.9)=0.451...<br>The result is in radians.</dd>
<dt>atan(x) or atg(x)</dt> <dt>atan(x) or atg(x)</dt>
<dd>Inverse tangent (arc tangent) of x<br>atan(3.3)=1.276...<br>The result is in radians.</dd> <dd>Inverse tangent (arc tangent) of x<br>atan(3.3)=1.276...<br>The result is in radians.</dd>
<dt>acot(x) or actg(x)</dt> <dt>acot(x) or actg(x)</dt>
<dd>Inverse cotangent (arc cotangent) of x<br>acot(10)=0.099...<br>The result is in radians.</dd> <dd>Inverse cotangent (arc cotangent) of x<br>acot(10)=0.099...<br>The result is in radians.</dd>
<dt>sinh(x)</dt> <dt>sinh(x)</dt>
<dd>This function returns hyperbolic sine of x<br>sinh(12)=81377.395...</dd> <dd>This function returns hyperbolic sine of x<br>sinh(12)=81377.395...</dd>
<dt>cosh(x)</dt> <dt>cosh(x)</dt>
<dd>Hyperbolic cosine of x<br>cosh(8.5)=2457.384...</dd> <dd>Hyperbolic cosine of x<br>cosh(8.5)=2457.384...</dd>
<dt>tanh(x) or tgh(x)</dt> <dt>tanh(x) or tgh(x)</dt>
<dd>Hyperbolic tangent of x<br>tanh(0.67)=0.584...</dd> <dd>Hyperbolic tangent of x<br>tanh(0.67)=0.584...</dd>
<dt>coth(x) or ctgh(x)</dt> <dt>coth(x) or ctgh(x)</dt>
<dd>Hyperbolic cotangent of x<br>coth(1.67)=1.073...</dd> <dd>Hyperbolic cotangent of x<br>coth(1.67)=1.073...</dd>
<dt>asinh(x)</dt> <dt>asinh(x)</dt>
<dd>This function returns inverse hyperbolic sine of x<br>asinh(3.6)=1.992...</dd> <dd>This function returns inverse hyperbolic sine of x<br>asinh(3.6)=1.992...</dd>
<dt>acosh(x)</dt> <dt>acosh(x)</dt>
<dd>This function returns inverse hyperbolic cosine of x<br>acosh(2.23)=1.440...</dd> <dd>This function returns inverse hyperbolic cosine of x<br>acosh(2.23)=1.440...</dd>
<dt>atanh(x) or atgh(x)</dt> <dt>atanh(x) or atgh(x)</dt>
<dd>This function returns inverse hyperbolic tangent of x<br>atanh(0.67)=0.810...</dd> <dd>This function returns inverse hyperbolic tangent of x<br>atanh(0.67)=0.810...</dd>
<dt>acoth(x) or actgh(x)</dt> <dt>acoth(x) or actgh(x)</dt>
<dd>This function returns inverse hyperbolic cotangent of x<br>acoth(1.23)=1.135...</dd> <dd>This function returns inverse hyperbolic cotangent of x<br>acoth(1.23)=1.135...</dd>
<dt>DegToDeg(deg; min; sec)</dt> <dt>DegToDeg(deg; min; sec)</dt>
<dd>This function converts degrees from the long format with degres, minutes and seconds into only degrees.<br> <dd>This function converts degrees from the long format with degres, minutes and seconds into only degrees.<br>
For example degtodeg(12; 30; 0)=12.5</dd> For example degtodeg(12; 30; 0)=12.5</dd>
<dt>DegToRad(deg)</dt> <dt>DegToRad(deg)</dt>
<dd>This function converts degrees into radians<br>degtorad(12.5)=0.218166...</dd> <dd>This function converts degrees into radians<br>degtorad(12.5)=0.218166...</dd>
<dt>DegToRad(deg; min; sec)</dt> <dt>DegToRad(deg; min; sec)</dt>
<dd>This function converts degrees in the long format (degrees, minutes, seconds) to radians.<br>For example <dd>This function converts degrees in the long format (degrees, minutes, seconds) to radians.<br>For example
degtorad(12; 30; 0)=0.218166...</dd> degtorad(12; 30; 0)=0.218166...</dd>
<dt>RadToDeg(rad)</dt> <dt>RadToDeg(rad)</dt>
<dd>This function converts radians into degrees<br>radtodeg(pi)=180</dd> <dd>This function converts radians into degrees<br>radtodeg(pi)=180</dd>
<dt>sqrt(x)</dt> <dt>sqrt(x)</dt>
<dd>Sqrt returns the square root of x<br>sqrt(9)=3</dd> <dd>Sqrt returns the square root of x<br>sqrt(9)=3</dd>
<dt>root(x ; n)</dt> <dt>root(x ; n)</dt>
<dd>The nth root of a 'x', 'n' must be integer and not negative, if 'n' is zero the result is one, <dd>The nth root of a 'x', 'n' must be integer and not negative, if 'n' is zero the result is one,
if 'x' is zero the result is zero and we assume that the root(0;0) is not defined, e.g.<br> if 'x' is zero the result is zero and we assume that the root(0;0) is not defined, e.g.<br>
root(8;3)=2<br> root(8;3)=2<br>
root(-8;3)=-2 root(-8;3)=-2
</dd> </dd>
<dt>factorial(x)</dt> <dt>factorial(x)</dt>
<dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd> <dd>The factorial function<br>factorial(6)=1*2*3*4*5*6=720</dd>
<dt>abs(x)</dt> <dt>abs(x)</dt>
<dd>The absolute value of x<br>abs(-10)=10</dd> <dd>The absolute value of x<br>abs(-10)=10</dd>
<dt>sgn(x)</dt> <dt>sgn(x)</dt>
<dd>This function returns the sign of x that means when the x is positive the result is 1, when the x is negative <dd>This function returns the sign of x that means when the x is positive the result is 1, when the x is negative
the result is -1 and when the x is zero the result is zero too<br> the result is -1 and when the x is zero the result is zero too<br>
sgn(-10)=-1<br> sgn(-10)=-1<br>
sgn(0)=0<br> sgn(0)=0<br>
sgn(5)=1</dd> sgn(5)=1</dd>
<dt>mod(x,y)</dt> <dt>mod(x,y)</dt>
<dd>Mod returns the remainder from the division x by y<br>mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2</dd> <dd>Mod returns the remainder from the division x by y<br>mod(10; 2.2)=1.2 because 10=2.2*4 + 1.2</dd>
<dt>int(x)</dt> <dt>int(x)</dt>
<dd>This method returns only the integer part of x.<br>int(2.7)=2</dd> <dd>This method returns only the integer part of x.<br>int(2.7)=2</dd>
<dt>round(x)</dt> <dt>round(x)</dt>
<dd>This method rounds the value of x to the nearest integer<br> <dd>This method rounds the value of x to the nearest integer<br>
round(2.8)=3<br> round(2.8)=3<br>
round(2.2)=2<br> round(2.2)=2<br>
round(2)=2<br> round(2)=2<br>
round(-4.8)=-5<br> round(-4.8)=-5<br>
round(-4.1)=-4</dd> round(-4.1)=-4</dd>
<dt>ceil(x)</dt> <dt>ceil(x)</dt>
<dd>This function returns a value representing the smallest integer that is greater than or equal to x<br> <dd>This function returns a value representing the smallest integer that is greater than or equal to x<br>
ceil(2.8)=3<br> ceil(2.8)=3<br>
ceil(2.2)=3<br> ceil(2.2)=3<br>
ceil(2)=2<br> ceil(2)=2<br>
ceil(-4.8)=-4<br> ceil(-4.8)=-4<br>
ceil(-4.1)=-4</dd> ceil(-4.1)=-4</dd>
<dt>floor(x)</dt> <dt>floor(x)</dt>
<dd>This function returns a value representing the largest integer that is less than or equal to x<br> <dd>This function returns a value representing the largest integer that is less than or equal to x<br>
floor(2.8)=2<br> floor(2.8)=2<br>
floor(2.2)=2<br> floor(2.2)=2<br>
floor(2)=2<br> floor(2)=2<br>
floor(-4.8)=-5<br> floor(-4.8)=-5<br>
floor(-4.1)=-5</dd> floor(-4.1)=-5</dd>
<dt>max(x1; x2; ...)</dt> <dt>max(x1; x2; ...)</dt>
<dd>This functions takes any number of arguments. It returns the max value of them. If there aren't arguments <dd>This functions takes any number of arguments. It returns the max value of them. If there aren't arguments
the function returns the max value which can be held in this precision.</dd> the function returns the max value which can be held in this precision.</dd>
<dt>min(x1; x2; ...)</dt> <dt>min(x1; x2; ...)</dt>
<dd>This functions takes any number of arguments. It returns the min value of them. If there aren't arguments <dd>This functions takes any number of arguments. It returns the min value of them. If there aren't arguments
the function returns the min value which can be held in this precision.</dd> the function returns the min value which can be held in this precision.</dd>
<dt>sum(x1; x2; ...)</dt> <dt>sum(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the sum of them.</dd> <dd>This functions takes one or more arguments. It returns the sum of them.</dd>
<dt>avg(x1; x2; ...)</dt> <dt>avg(x1; x2; ...)</dt>
<dd>This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by <dd>This functions takes one or more arguments. It returns the arithmetic mean. (The sum divided by
the number of arguments)</dd> the number of arguments)</dd>
</dl> </dl>
</body> </body>
</html> </html>

View File

@ -1,49 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - bitwise functions</title> <title>TTCalc - bitwise functions</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="bitand"> <param name="Keyword" value="bitand">
<param name="Keyword" value="bitor"> <param name="Keyword" value="bitor">
<param name="Keyword" value="bitxor"> <param name="Keyword" value="bitxor">
<param name="Keyword" value="band"> <param name="Keyword" value="band">
<param name="Keyword" value="bor"> <param name="Keyword" value="bor">
<param name="Keyword" value="bxor"> <param name="Keyword" value="bxor">
<param name="Keyword" value="bitwise functions"> <param name="Keyword" value="bitwise functions">
</object> </object>
</head> </head>
<body> <body>
<h1>Bitwise functions</h1> <h1>Bitwise functions</h1>
<p> <p>
There are bitwise functions in the program but they can operate only on non-negative values. There are bitwise functions in the program but they can operate only on non-negative values.
We don't define the BitNot() function too. We don't define the BitNot() function too.
</p> </p>
<dl> <dl>
<dt>BitAnd(x ; y) or band(x ; y)</dt> <dt>BitAnd(x ; y) or band(x ; y)</dt>
<dd>Bitwise AND. For example:<br> <dd>Bitwise AND. For example:<br>
bitand(6; 2) = bitand(&amp;110 ; &amp;10) = &amp;10 = 2<br> bitand(6; 2) = bitand(&amp;110 ; &amp;10) = &amp;10 = 2<br>
bitand(6.5; 2.5) = bitand(&amp;110.1 ; &amp;10.1) = &amp;10.1 = 2.5</dd> bitand(6.5; 2.5) = bitand(&amp;110.1 ; &amp;10.1) = &amp;10.1 = 2.5</dd>
<dt>BitOr(x ; y) or bor(x ; y)</dt> <dt>BitOr(x ; y) or bor(x ; y)</dt>
<dd>Bitwise OR. For example:<br> <dd>Bitwise OR. For example:<br>
bitor(6; 1) = bitor(&amp;110 ; &amp;1) = &amp;111 = 7<br> bitor(6; 1) = bitor(&amp;110 ; &amp;1) = &amp;111 = 7<br>
bitor(6.5; 1.5) = bitor(&amp;110.1 ; &amp;1.1) = &amp;111.1 = 7.5</dd> bitor(6.5; 1.5) = bitor(&amp;110.1 ; &amp;1.1) = &amp;111.1 = 7.5</dd>
<dt>BitXor(x ; y) or bxor(x ; y)</dt> <dt>BitXor(x ; y) or bxor(x ; y)</dt>
<dd>Bitwise XOR. For example:<br> <dd>Bitwise XOR. For example:<br>
bitxor(6; 3) = bitxor(&amp;110 ; &amp;11) = &amp;101 = 5<br> bitxor(6; 3) = bitxor(&amp;110 ; &amp;11) = &amp;101 = 5<br>
bitxor(6.5; 3.5) = bitxor(&amp;110.1 ; &amp;11.1) = &amp;101.0 = 5</dd> bitxor(6.5; 3.5) = bitxor(&amp;110.1 ; &amp;11.1) = &amp;101.0 = 5</dd>
</dl> </dl>
</body> </body>
</html> </html>

View File

@ -1,24 +1,24 @@
[OPTIONS] [OPTIONS]
Auto Index=Yes Auto Index=Yes
Compatibility=1.1 or later Compatibility=1.1 or later
Compiled file=..\..\output\ttcalc.chm Compiled file=..\..\output\ttcalc.chm
Contents file=toc.hhc Contents file=toc.hhc
Default topic=index.html Default topic=index.html
Display compile progress=No Display compile progress=No
Index file=index.hhk Index file=index.hhk
Language=0x809 Angielski (Wielka Brytania) Language=0x809 Angielski (Wielka Brytania)
Title=TTCalc Title=TTCalc
[FILES] [FILES]
values_and_std_operators.html values_and_std_operators.html
arithmetic_functions.html arithmetic_functions.html
logical_functions.html logical_functions.html
operators_priority.html operators_priority.html
userfunctions.html userfunctions.html
index.html index.html
tips.html tips.html
bitwise_functions.html bitwise_functions.html
[INFOTYPES] [INFOTYPES]

View File

@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1"> <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 --> <!-- Sitemap 1.0 -->
</HEAD><BODY> </HEAD><BODY>
<UL> <UL>
</UL> </UL>
</BODY></HTML> </BODY></HTML>

View File

@ -1,47 +1,47 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc</title> <title>TTCalc</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="TTCalc"> <param name="Keyword" value="TTCalc">
<param name="Keyword" value="author"> <param name="Keyword" value="author">
<param name="Keyword" value="contact"> <param name="Keyword" value="contact">
<param name="Keyword" value="licence"> <param name="Keyword" value="licence">
<param name="Keyword" value="operating systems"> <param name="Keyword" value="operating systems">
<param name="Keyword" value="project page"> <param name="Keyword" value="project page">
</object> </object>
</head> </head>
<body> <body>
<h1>TTCalc</h1> <h1>TTCalc</h1>
<p> <p>
TTCalc is a mathematical calculator. It has a nice user interface, formulas for TTCalc is a mathematical calculator. It has a nice user interface, formulas for
calculating can be inserted by using a keyboard or a mouse. The result is automatically calculating can be inserted by using a keyboard or a mouse. The result is automatically
shown in a second window without using any additional keys such as 'equal'. The shown in a second window without using any additional keys such as 'equal'. The
program possess trigonometric functions, inverse trigonometric functions, hyperbolic program possess trigonometric functions, inverse trigonometric functions, hyperbolic
functions, logical operators, logarithms, functions for converting between degrees and functions, logical operators, logarithms, functions for converting between degrees and
radians and so on. Additionally the program allows the user to define his own radians and so on. Additionally the program allows the user to define his own
variables and functions. Calculations are performed by using floating point numbers variables and functions. Calculations are performed by using floating point numbers
with three kind of precision, the biggest has 288 bits for its mantissa and 96 bits with three kind of precision, the biggest has 288 bits for its mantissa and 96 bits
for its exponent that is about 2.551...e+11925026709067095507636213441 with 85 valid for its exponent that is about 2.551...e+11925026709067095507636213441 with 85 valid
decimal digits. The program independently allows to insert and display values with decimal digits. The program independently allows to insert and display values with
the base (radix) from two to sixteen. the base (radix) from two to sixteen.
</p> </p>
<table> <table>
<tr><td>Author:</td><td>Tomasz Sowa</td></tr> <tr><td>Author:</td><td>Tomasz Sowa</td></tr>
<tr><td>Contact:</td><td>t.sowa@slimaczek.pl</td></tr> <tr><td>Contact:</td><td>t.sowa@slimaczek.pl</td></tr>
<tr><td>Licence:</td><td>BSD (open source)</td></tr> <tr><td>Licence:</td><td>BSD (open source)</td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP (Vista was not tested)</td></tr> <tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP (Vista was not tested)</td></tr>
<tr><td>Interface:</td><td>English, Polish</td></tr> <tr><td>Interface:</td><td>English, Polish</td></tr>
<tr><td>Project page:</td><td><a href="http://sourceforge.net/projects/ttcalc">http://sourceforge.net/projects/ttcalc</a></td></tr> <tr><td>Project page:</td><td><a href="http://sourceforge.net/projects/ttcalc">http://sourceforge.net/projects/ttcalc</a></td></tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,103 +1,103 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - comparative and logical operators and functions</title> <title>TTCalc - comparative and logical operators and functions</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="&lt;"> <param name="Keyword" value="&lt;">
<param name="Keyword" value="&gt;"> <param name="Keyword" value="&gt;">
<param name="Keyword" value="&lt;="> <param name="Keyword" value="&lt;=">
<param name="Keyword" value="&gt;="> <param name="Keyword" value="&gt;=">
<param name="Keyword" value="=="> <param name="Keyword" value="==">
<param name="Keyword" value="!="> <param name="Keyword" value="!=">
<param name="Keyword" value="&amp;&amp;"> <param name="Keyword" value="&amp;&amp;">
<param name="Keyword" value="||"> <param name="Keyword" value="||">
<param name="Keyword" value="if"> <param name="Keyword" value="if">
<param name="Keyword" value="and"> <param name="Keyword" value="and">
<param name="Keyword" value="or"> <param name="Keyword" value="or">
<param name="Keyword" value="not"> <param name="Keyword" value="not">
<param name="Keyword" value="logical operators"> <param name="Keyword" value="logical operators">
<param name="Keyword" value="comparative operators"> <param name="Keyword" value="comparative operators">
<param name="Keyword" value="logical functions"> <param name="Keyword" value="logical functions">
</object> </object>
</head> </head>
<body> <body>
<h1>Comparative and logical operators and functions</h1> <h1>Comparative and logical operators and functions</h1>
<p> <p>
We assume that the logical false is represented by zero and the logical true is represented by the We assume that the logical false is represented by zero and the logical true is represented by the
value different from zero. <strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'. value different from zero. <strong>Note:</strong> If a function takes more than one argument, the arguments are separated with semicolon ';'.
</p> </p>
<dl> <dl>
<dt>x &lt; y</dt> <dt>x &lt; y</dt>
<dd>This operator returns one if x is lower than y else it returns zero. For example:<br> <dd>This operator returns one if x is lower than y else it returns zero. For example:<br>
4 &lt; 10 = 1<br> 4 &lt; 10 = 1<br>
6 &lt; 2 = 0</dd> 6 &lt; 2 = 0</dd>
<dt>x &gt; y</dt> <dt>x &gt; y</dt>
<dd>This operator returns one if x is greater than y else it returns zero. For example:<br> <dd>This operator returns one if x is greater than y else it returns zero. For example:<br>
5 &gt; 2 = 1<br> 5 &gt; 2 = 1<br>
5 &gt; 8 = 0</dd> 5 &gt; 8 = 0</dd>
<dt>x &lt;= y</dt> <dt>x &lt;= y</dt>
<dd>This operator returns one if x is lower than or equal to y else it returns zero. For example:<br> <dd>This operator returns one if x is lower than or equal to y else it returns zero. For example:<br>
4 &lt;= 4 = 1<br> 4 &lt;= 4 = 1<br>
7 &lt;= 2 = 0</dd> 7 &lt;= 2 = 0</dd>
<dt>x &gt;= y</dt> <dt>x &gt;= y</dt>
<dd>This operator returns one if x is greater than or equal to y else it returns zero. For example:<br> <dd>This operator returns one if x is greater than or equal to y else it returns zero. For example:<br>
5 &gt;= 5 = 1<br> 5 &gt;= 5 = 1<br>
3 &gt;= 4 = 0</dd> 3 &gt;= 4 = 0</dd>
<dt>x == y</dt> <dt>x == y</dt>
<dd>This operator returns one if x is equal y else it returns zero. For example:<br> <dd>This operator returns one if x is equal y else it returns zero. For example:<br>
4 == 4 = 1<br> 4 == 4 = 1<br>
6 == 2 = 0</dd> 6 == 2 = 0</dd>
<dt>x != y</dt> <dt>x != y</dt>
<dd>This operator returns one if x is different from y else it returns zero. For example:<br> <dd>This operator returns one if x is different from y else it returns zero. For example:<br>
5 != 2 = 1<br> 5 != 2 = 1<br>
5 != 5 = 0</dd> 5 != 5 = 0</dd>
<dt>x &amp;&amp; y (logical and)</dt> <dt>x &amp;&amp; y (logical and)</dt>
<dd>This operator returns one if both x and y are different from zero else it returns zero. For example:<br> <dd>This operator returns one if both x and y are different from zero else it returns zero. For example:<br>
4 &amp;&amp; 10 = 1<br> 4 &amp;&amp; 10 = 1<br>
6 &amp;&amp; 0 = 0<br> 6 &amp;&amp; 0 = 0<br>
0 &amp;&amp; 0 = 0</dd> 0 &amp;&amp; 0 = 0</dd>
<dt>x || y (logical or)</dt> <dt>x || y (logical or)</dt>
<dd>This operator returns one either if x or y are different from zero else it returns zero. For example:<br> <dd>This operator returns one either if x or y are different from zero else it returns zero. For example:<br>
5 || 2 = 1<br> 5 || 2 = 1<br>
0 || 3 = 1<br> 0 || 3 = 1<br>
0 || 0 = 0</dd> 0 || 0 = 0</dd>
<dt>if(condition; if_true; if_false)</dt> <dt>if(condition; if_true; if_false)</dt>
<dd>If the 'condition' is true (different from zero) the function returns 'if_true' else it returns 'if_false', e.g.<br> <dd>If the 'condition' is true (different from zero) the function returns 'if_true' else it returns 'if_false', e.g.<br>
if( 0 ; 20 ; 30) = 30<br> if( 0 ; 20 ; 30) = 30<br>
if( 1 ; 20 ; 30) = 20<br> if( 1 ; 20 ; 30) = 20<br>
if( 4<5 ; 10 ; 50) = 10<br> if( 4<5 ; 10 ; 50) = 10<br>
if( 6>10 ; 200 ; 100) = 100</dd> if( 6>10 ; 200 ; 100) = 100</dd>
<dt>and(x ; y)</dt> <dt>and(x ; y)</dt>
<dd>This function does the same thing as the logical operator 'and' (&amp;&amp;)</dd> <dd>This function does the same thing as the logical operator 'and' (&amp;&amp;)</dd>
<dt>or(x ; y)</dt> <dt>or(x ; y)</dt>
<dd>This function does the same thing as the logical operator 'or' (||)</dd> <dd>This function does the same thing as the logical operator 'or' (||)</dd>
<dt>not(x)</dt> <dt>not(x)</dt>
<dd>If the x is true (different from zero) this function returns zero, otherwise it returns one, e.g.<br> <dd>If the x is true (different from zero) this function returns zero, otherwise it returns one, e.g.<br>
not(15)=0<br> not(15)=0<br>
not(0)=1</dd> not(0)=1</dd>
</dl> </dl>
</body> </body>
</html> </html>

View File

@ -1,35 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - operators priority</title> <title>TTCalc - operators priority</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="operators priority"> <param name="Keyword" value="operators priority">
</object> </object>
</head> </head>
<body> <body>
<h1>Operators Priority</h1> <h1>Operators Priority</h1>
<p>Below is a list of operators priority. At the top are operators with higher precedence.</p> <p>Below is a list of operators priority. At the top are operators with higher precedence.</p>
<table> <table>
<thead> <thead>
<tr><td>Operator</td><td>Description</td><td>Sample</td></tr> <tr><td>Operator</td><td>Description</td><td>Sample</td></tr>
</thead> </thead>
<tr><td>( )</td><td>parentheses for grouping an expression</td><td>(1+3)*4</td></tr> <tr><td>( )</td><td>parentheses for grouping an expression</td><td>(1+3)*4</td></tr>
<tr><td>- + # &amp;</td><td>unary minus and plus, and operators for changing the base (radix)</td><td>-10</td></tr> <tr><td>- + # &amp;</td><td>unary minus and plus, and operators for changing the base (radix)</td><td>-10</td></tr>
<tr><td>without an operator</td><td>short form of multiplicating (only if the second argument is a variable or function)</td><td>3y</td></tr> <tr><td>without an operator</td><td>short form of multiplicating (only if the second argument is a variable or function)</td><td>3y</td></tr>
<tr><td>^</td><td>powering</td><td>3^2</td></tr> <tr><td>^</td><td>powering</td><td>3^2</td></tr>
<tr><td>* /</td><td>multiplication and division</td><td>10*20</td></tr> <tr><td>* /</td><td>multiplication and division</td><td>10*20</td></tr>
<tr><td>+ -</td><td>addition and subtraction</td><td>10-30</td></tr> <tr><td>+ -</td><td>addition and subtraction</td><td>10-30</td></tr>
<tr><td>== != &lt; &gt; &lt;= &gt;=</td><td>comparative operators</td><td>4&lt;5</td></tr> <tr><td>== != &lt; &gt; &lt;= &gt;=</td><td>comparative operators</td><td>4&lt;5</td></tr>
<tr><td>&amp;&amp;</td><td>logical and</td><td>3&gt;2 &amp;&amp; 3&lt;10</td></tr> <tr><td>&amp;&amp;</td><td>logical and</td><td>3&gt;2 &amp;&amp; 3&lt;10</td></tr>
<tr><td>||</td><td>logical or</td><td>3&gt;2 || 3&lt;10</td></tr> <tr><td>||</td><td>logical or</td><td>3&gt;2 || 3&lt;10</td></tr>
</table> </table>
</body> </body>
</html> </html>

View File

@ -1,48 +1,48 @@
html * { html * {
margin: 0; margin: 0;
border: 0; border: 0;
padding: 0; padding: 0;
} }
html, body { html, body {
font-size: 14px; font-size: 14px;
font-family: Tahoma, Arial, Sans-serif; font-family: Tahoma, Arial, Sans-serif;
} }
body { body {
margin: 0 0 20px 20px; margin: 0 0 20px 20px;
} }
h1 { h1 {
font-size: 2em; font-size: 2em;
font-family: Arial, Tahoma, Sans-serif; font-family: Arial, Tahoma, Sans-serif;
margin: 1.4em 0 1em 0; margin: 1.4em 0 1em 0;
} }
p { p {
margin: 1em 0 1em 0; margin: 1em 0 1em 0;
} }
dt { dt {
font-size: 1.4em; font-size: 1.4em;
margin-top: 1em; margin-top: 1em;
} }
dd { dd {
padding: 0.3em 0 0 2em; padding: 0.3em 0 0 2em;
} }
thead { thead {
font-size: 1.2em; font-size: 1.2em;
} }
td { td {
padding: 0 2em 0 0; padding: 0 2em 0 0;
} }

View File

@ -1,53 +1,53 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - tips</title> <title>TTCalc - tips</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="tips"> <param name="Keyword" value="tips">
<param name="Keyword" value="esc"> <param name="Keyword" value="esc">
<param name="Keyword" value="#"> <param name="Keyword" value="#">
<param name="Keyword" value="&amp;"> <param name="Keyword" value="&amp;">
<param name="Keyword" value="global semicolon"> <param name="Keyword" value="global semicolon">
<param name="Keyword" value="CTRL+C"> <param name="Keyword" value="CTRL+C">
<param name="Keyword" value="CTRL+V"> <param name="Keyword" value="CTRL+V">
</object> </object>
</head> </head>
<body> <body>
<h1>Tips</h1> <h1>Tips</h1>
<p> <p>
If you want to clear the input edit or if you want to put something in and the focus is If you want to clear the input edit or if you want to put something in and the focus is
somewhere on the tabs just type ESC, the entire edit will be selected and have a focus. somewhere on the tabs just type ESC, the entire edit will be selected and have a focus.
</p> </p>
<p> <p>
If you want to insert a value with a base (radix) 2 or 16 use the unary operator &amp; (for the base 2) If you want to insert a value with a base (radix) 2 or 16 use the unary operator &amp; (for the base 2)
or # (for the base 16). or # (for the base 16).
For example &amp;10=2 (decimal), #10=16 (decimal). When you're using these operators For example &amp;10=2 (decimal), #10=16 (decimal). When you're using these operators
then 'input' mode on the 'display' tab is ignored. then 'input' mode on the 'display' tab is ignored.
</p> </p>
<p> <p>
You can calculate more than one formula at the same time. To achive this use a semicolon You can calculate more than one formula at the same time. To achive this use a semicolon
in the global space, for example type '2+4 ; 5*10' and the result will be '6&nbsp;&nbsp;&nbsp;50'. in the global space, for example type '2+4 ; 5*10' and the result will be '6&nbsp;&nbsp;&nbsp;50'.
</p> </p>
<p> <p>
You can use CTRL+C to copy the result from the output edit into the clipboard You can use CTRL+C to copy the result from the output edit into the clipboard
(if a control which has a focus is not an edit control, or if it is an edit but (if a control which has a focus is not an edit control, or if it is an edit but
has no selection) has no selection)
</p> </p>
<p> <p>
Also you can use CTRL+V to paste a text from the clipboard into the input control Also you can use CTRL+V to paste a text from the clipboard into the input control
(if a focus is not on another edit control) (if a focus is not on another edit control)
</p> </p>
</body> </body>
</html> </html>

View File

@ -1,46 +1,46 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1"> <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 --> <!-- Sitemap 1.0 -->
</HEAD><BODY> </HEAD><BODY>
<OBJECT type="text/site properties"> <OBJECT type="text/site properties">
<param name="ImageType" value="Folder"> <param name="ImageType" value="Folder">
</OBJECT> </OBJECT>
<UL> <UL>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="TTCalc"> <param name="Name" value="TTCalc">
<param name="Local" value="index.html"> <param name="Local" value="index.html">
</OBJECT> </OBJECT>
<UL> <UL>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Numbers, standard operators and built-in variables"> <param name="Name" value="Numbers, standard operators and built-in variables">
<param name="Local" value="values_and_std_operators.html"> <param name="Local" value="values_and_std_operators.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Arithmetic functions"> <param name="Name" value="Arithmetic functions">
<param name="Local" value="arithmetic_functions.html"> <param name="Local" value="arithmetic_functions.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Logical operators and functions"> <param name="Name" value="Logical operators and functions">
<param name="Local" value="logical_functions.html"> <param name="Local" value="logical_functions.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Bitwise functions"> <param name="Name" value="Bitwise functions">
<param name="Local" value="bitwise_functions.html"> <param name="Local" value="bitwise_functions.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="User defined variables and functions"> <param name="Name" value="User defined variables and functions">
<param name="Local" value="userfunctions.html"> <param name="Local" value="userfunctions.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Operators priority"> <param name="Name" value="Operators priority">
<param name="Local" value="operators_priority.html"> <param name="Local" value="operators_priority.html">
</OBJECT> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <LI> <OBJECT type="text/sitemap">
<param name="Name" value="Tips"> <param name="Name" value="Tips">
<param name="Local" value="tips.html"> <param name="Local" value="tips.html">
</OBJECT> </OBJECT>
</UL> </UL>
</UL> </UL>
</BODY></HTML> </BODY></HTML>

View File

@ -1,36 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - user defined variables and functions</title> <title>TTCalc - user defined variables and functions</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="user defined variables"> <param name="Keyword" value="user defined variables">
<param name="Keyword" value="user defined functions"> <param name="Keyword" value="user defined functions">
</object> </object>
</head> </head>
<body> <body>
<h1>User defined variables and functions</h1> <h1>User defined variables and functions</h1>
<p> <p>
You are allowed to define your own variables and functions. As a name of a variable or a function You are allowed to define your own variables and functions. As a name of a variable or a function
can be a name consists of letters, digits or an underline character but the first character must be a letter. can be a name consists of letters, digits or an underline character but the first character must be a letter.
From version 0.8.3 names are case-sensitive that means 'name' is not the same as 'NaMe'. For example these From version 0.8.3 names are case-sensitive that means 'name' is not the same as 'NaMe'. For example these
are correct names: a, b, c3, MyName, etc. During defining variables and functions you can call another are correct names: a, b, c3, MyName, etc. During defining variables and functions you can call another
variables and functions but you cannot call a variable or a function twice. Recurrence calling are not allowed. variables and functions but you cannot call a variable or a function twice. Recurrence calling are not allowed.
</p> </p>
<p> <p>
Functions can get maximum 9 parameters. You have to specify how many parameters your function takes and Functions can get maximum 9 parameters. You have to specify how many parameters your function takes and
you can refer to them by using the variable 'x' with a number from 1 to 9 ('x' without a number means 'x1'). you can refer to them by using the variable 'x' with a number from 1 to 9 ('x' without a number means 'x1').
For example you can define a function 'xy' as 'x1*x2' (of course without apostrophes), set the 'parameters' on 2 For example you can define a function 'xy' as 'x1*x2' (of course without apostrophes), set the 'parameters' on 2
and then put into the edit box an expression 'xy(10;20)', the result will be 200. Note that we use a semicolon and then put into the edit box an expression 'xy(10;20)', the result will be 200. Note that we use a semicolon
to separate arguments in a function. to separate arguments in a function.
</p> </p>
</body> </body>
</html> </html>

View File

@ -1,65 +1,65 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<title>TTCalc - numbers, standard operators and built-in variables</title> <title>TTCalc - numbers, standard operators and built-in variables</title>
<link rel="stylesheet" href="styles.css" type="text/css"> <link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="numbers"> <param name="Keyword" value="numbers">
<param name="Keyword" value="comma"> <param name="Keyword" value="comma">
<param name="Keyword" value="dot"> <param name="Keyword" value="dot">
<param name="Keyword" value="standard operators"> <param name="Keyword" value="standard operators">
<param name="Keyword" value="builtin variables"> <param name="Keyword" value="builtin variables">
<param name="Keyword" value="e"> <param name="Keyword" value="e">
<param name="Keyword" value="^"> <param name="Keyword" value="^">
<param name="Keyword" value="*"> <param name="Keyword" value="*">
<param name="Keyword" value="/"> <param name="Keyword" value="/">
<param name="Keyword" value="+"> <param name="Keyword" value="+">
<param name="Keyword" value="-"> <param name="Keyword" value="-">
</object> </object>
</head> </head>
<body> <body>
<h1>Numbers</h1> <h1>Numbers</h1>
You can type numbers directly using a keyboard or insert them by a mouse. This is a simple edit window, You can type numbers directly using a keyboard or insert them by a mouse. This is a simple edit window,
you can use arrow keys etc. and copy&amp;paste a text by using standard shortcuts such as CTRL+C and CTRL+V. you can use arrow keys etc. and copy&amp;paste a text by using standard shortcuts such as CTRL+C and CTRL+V.
As the decimal point can be either a comma or a dot that means 1,234 is the same as 1.234. As the decimal point can be either a comma or a dot that means 1,234 is the same as 1.234.
<h1>Standard operators</h1> <h1>Standard operators</h1>
<dl> <dl>
<dt>^</dt> <dt>^</dt>
<dd>Powering</dd> <dd>Powering</dd>
<dt>*</dt> <dt>*</dt>
<dd>Multiplication</dd> <dd>Multiplication</dd>
<dt>/</dt> <dt>/</dt>
<dd>Division</dd> <dd>Division</dd>
<dt>+</dt> <dt>+</dt>
<dd>Addition</dd> <dd>Addition</dd>
<dt>-</dt> <dt>-</dt>
<dd>Subtraction</dd> <dd>Subtraction</dd>
</dl> </dl>
<p>Of course you can use the parentheses ( and ). Look at the <a href="operators_priority.html">operators priority</a> as well.</p> <p>Of course you can use the parentheses ( and ). Look at the <a href="operators_priority.html">operators priority</a> as well.</p>
<h1>Built-in variables</h1> <h1>Built-in variables</h1>
<p>You can use following variables, just type its name into the edit window.</p> <p>You can use following variables, just type its name into the edit window.</p>
<dl> <dl>
<dt>e</dt> <dt>e</dt>
<dd>The base of the natural logarithm.<br>e = 2.718...</dd> <dd>The base of the natural logarithm.<br>e = 2.718...</dd>
<dt>pi</dt> <dt>pi</dt>
<dd>The ratio of a circle's circumference to its diameter.<br>pi=3.141...</dd> <dd>The ratio of a circle's circumference to its diameter.<br>pi=3.141...</dd>
</dl> </dl>
</body> </body>
</html> </html>

BIN
res/icon02.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -1,4 +1,4 @@
Copyright (c) 2006-2007, Tomasz Sowa Copyright (c) 2006-2009, Tomasz Sowa
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@ -1,44 +1,49 @@
; Script generated by the Inno Setup Script Wizard. ; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup] [Setup]
AppName=TTCalc AppName=TTCalc
AppVerName=TTCalc 0.8.1 AppVerName=TTCalc 0.8.3
AppPublisher=Tomasz Sowa AppPublisher=Tomasz Sowa
AppPublisherURL=http://sourceforge.net/projects/ttcalc AppPublisherURL=http://ttcalc.sourceforge.net
AppSupportURL=http://sourceforge.net/projects/ttcalc AppSupportURL=http://ttcalc.sourceforge.net
AppUpdatesURL=http://sourceforge.net/projects/ttcalc AppUpdatesURL=http://ttcalc.sourceforge.net
DefaultDirName={pf}\TTCalc DefaultDirName={pf}\TTCalc
DefaultGroupName=TTCalc DefaultGroupName=TTCalc
AllowNoIcons=yes AllowNoIcons=yes
LicenseFile=COPYRIGHT ; special COPYRIGHT version (without a new line characters in the clause -- it is better displayed in the setup window)
OutputDir=..\..\output LicenseFile=COPYRIGHT
OutputBaseFilename=ttcalc-setup OutputDir=..\..\output
Compression=lzma OutputBaseFilename=ttcalc-setup
SolidCompression=yes Compression=lzma
SolidCompression=yes
[Languages] ShowUndisplayableLanguages=yes
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" [Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
[Tasks] Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[InstallDelete]
[Files] ; prior to 0.8.3 we were using mingwm10.dll (now it is not needed and will be deleted if exists)
Source: "..\..\output\ttcalc.exe"; DestDir: "{app}"; Flags: ignoreversion Type: files; Name: "{app}\mingwm10.dll"
Source: "..\..\output\mingwm10.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\output\ttcalc.chm"; DestDir: "{app}"; Flags: ignoreversion [Tasks]
Source: "..\COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Source: "ttcalc.ini"; DestDir: "{userappdata}\TTCalc"; Flags: onlyifdoesntexist
; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Files]
Source: "..\..\output\ttcalc.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons] Source: "..\..\output\ttcalc.chm"; DestDir: "{app}"; Flags: ignoreversion
Name: "{group}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}" Source: "..\COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion
Name: "{group}\Help"; Filename: "{app}\ttcalc.chm"; WorkingDir: "{app}" ; now we do not use *.ini file in the installer
Name: "{group}\{cm:UninstallProgram,TTCalc}"; Filename: "{uninstallexe}" ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Name: "{commondesktop}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}"; Tasks: desktopicon
[Icons]
[Run] Name: "{group}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}"
Filename: "{app}\ttcalc.exe"; Description: "{cm:LaunchProgram,TTCalc}"; Flags: nowait postinstall skipifsilent Name: "{group}\Help"; Filename: "{app}\ttcalc.chm"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,TTCalc}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}"; Tasks: desktopicon
[Run]
Filename: "{app}\ttcalc.exe"; Description: "{cm:LaunchProgram,TTCalc}"; Flags: nowait postinstall skipifsilent

View File

@ -1,21 +0,0 @@
# the configuration file of the program ttcalc
[GLOBAL]
always.on.top = 0
view = 0
maximized = 0
x = 0
y = 0
size.x = 402
size.y = 288
precision = 0
disp.input = 10
disp.output = 10
language = 0
disp.alw.scientific = 0
disp.when.scientific = 15
disp.rounding = -2
[variables]
[functions]

View File

@ -1,5 +1,6 @@
CC = g++ CC = g++
CFLAGS = -Wall -pedantic -s -O2 -mwindows -mthreads -I../../../ttmath #CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../../ttmath -DTTCALC_CONVERT
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../../ttmath
name = ttcalc.exe name = ttcalc.exe
# the name of the help is also set in the html help workshop project file # the name of the help is also set in the html help workshop project file
@ -21,6 +22,7 @@ $(dir_output)/$(name): $(o)
ttcalc: $(dir_output)/$(name) ttcalc: $(dir_output)/$(name)
resource.o: resource.rc resource.o: resource.rc
#windres -DTTCALC_CONVERT resource.rc resource.o
windres resource.rc resource.o windres resource.rc resource.o
$(dir_output)/$(helpname): $(helpdep) $(dir_output)/$(helpname): $(helpdep)

View File

@ -1,5 +1,6 @@
o = resource.o calculation.o convert.o functions.o iniparser.o languages.o mainwindow.o parsermanager.o programresources.o tabs.o variables.o winmain.o o = resource.o calculation.o convert.o functions.o iniparser.o languages.o mainwindow.o parsermanager.o programresources.o tabs.o variables.o winmain.o
calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
convert.o: convert.cpp convert.h compileconfig.h bigtypes.h convert.o: convert.cpp convert.h compileconfig.h bigtypes.h
functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
@ -11,7 +12,7 @@ programresources.o: programresources.cpp compileconfig.h programresources.h inip
tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h
.SUFFIXES: .cpp .o .SUFFIXES: .cpp .o
@ -32,4 +33,4 @@ helpdep = ../help/arithmetic_functions.html \
../help/toc.hhc \ ../help/toc.hhc \
../help/help.hhp ../help/help.hhp
setupdep = ttcalc help ../setup/innosetup.iss ../setup/COPYRIGHT ../setup/ttcalc.ini setupdep = ttcalc help ../setup/innosetup.iss ../setup/COPYRIGHT

View File

@ -1,5 +1,5 @@
CC = g++ CC = g++
CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -mthreads -I../../../ttmath -DTTCALC_PORTABLE CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -I../../../ttmath -DTTCALC_PORTABLE
name = ttcalcp.exe name = ttcalcp.exe
dir_output = ../../output dir_output = ../../output
compressor = upx compressor = upx

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2008, Tomasz Sowa * Copyright (c) 2006-2009, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -274,7 +274,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(combo_rounding_integer,"to integer"); InsertGuiPair(combo_rounding_integer,"to integer");
InsertGuiPair(combo_rounding_to_number,"to"); InsertGuiPair(combo_rounding_to_number,"to");
InsertGuiPair(combo_rounding_after_comma,"digit(s)"); InsertGuiPair(combo_rounding_after_comma,"digit(s)");
InsertGuiPair(check_remove_zeroes,"Remove trailing zeroes"); InsertGuiPair(check_remove_zeroes,"Remove last trailing zeroes");
InsertGuiPair(display_input, "Input"); InsertGuiPair(display_input, "Input");
InsertGuiPair(display_output, "Output"); InsertGuiPair(display_output, "Output");
@ -283,6 +283,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_not_always_scientific,"When the exponent is greater than:"); InsertGuiPair(display_not_always_scientific,"When the exponent is greater than:");
InsertGuiPair(display_group_scientific, "Print the result as the scientific value"); InsertGuiPair(display_group_scientific, "Print the result as the scientific value");
InsertGuiPair(display_decimal_point, "Decimal point"); InsertGuiPair(display_decimal_point, "Decimal point");
InsertGuiPair(display_deg_red_grad, "sin/cos asin/acos");
InsertGuiPair(convert_type, "Type"); InsertGuiPair(convert_type, "Type");
InsertGuiPair(convert_input, "Input"); InsertGuiPair(convert_input, "Input");
InsertGuiPair(convert_output, "Output"); InsertGuiPair(convert_output, "Output");
@ -407,6 +408,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_not_always_scientific,"Jeœli eksponent jest wiêkszy ni¿:"); InsertGuiPair(display_not_always_scientific,"Jeœli eksponent jest wiêkszy ni¿:");
InsertGuiPair(display_group_scientific, "Wyœwietl wynik w postaci naukowej"); InsertGuiPair(display_group_scientific, "Wyœwietl wynik w postaci naukowej");
InsertGuiPair(display_decimal_point, "Przecinek dziesiêtny"); InsertGuiPair(display_decimal_point, "Przecinek dziesiêtny");
InsertGuiPair(display_deg_red_grad, "sin/cos asin/acos");
InsertGuiPair(convert_type, "Typ"); InsertGuiPair(convert_type, "Typ");
InsertGuiPair(convert_input, "Wejœcie"); InsertGuiPair(convert_input, "Wejœcie");
InsertGuiPair(convert_output, "Wyjœcie"); InsertGuiPair(convert_output, "Wyjœcie");
@ -522,7 +524,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(combo_rounding_none,"Ninguno"); InsertGuiPair(combo_rounding_none,"Ninguno");
InsertGuiPair(combo_rounding_integer,"a entero"); InsertGuiPair(combo_rounding_integer,"a entero");
InsertGuiPair(combo_rounding_to_number,"a numero"); //InsertGuiPair(combo_rounding_to_number,"a numero");
// this text was too long (the combobox is shorter now) -- I'm not sure whether this is correct now... (I don't know spanish at all)
InsertGuiPair(combo_rounding_to_number,"a");
InsertGuiPair(combo_rounding_after_comma,"digito(s)"); InsertGuiPair(combo_rounding_after_comma,"digito(s)");
InsertGuiPair(check_remove_zeroes,"Eliminar ceros no-significativos"); InsertGuiPair(check_remove_zeroes,"Eliminar ceros no-significativos");
@ -533,6 +537,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_not_always_scientific,"Cuando el exponente es mas grande que:"); InsertGuiPair(display_not_always_scientific,"Cuando el exponente es mas grande que:");
InsertGuiPair(display_group_scientific, "Imprimir el resultado como valor cientifico"); InsertGuiPair(display_group_scientific, "Imprimir el resultado como valor cientifico");
InsertGuiPair(display_decimal_point, "Decimal point"); InsertGuiPair(display_decimal_point, "Decimal point");
InsertGuiPair(display_deg_red_grad, "sin/cos asin/acos");
InsertGuiPair(convert_type, "Tipo"); InsertGuiPair(convert_type, "Tipo");
InsertGuiPair(convert_input, "Entrada"); InsertGuiPair(convert_input, "Entrada");
InsertGuiPair(convert_output, "Salida"); InsertGuiPair(convert_output, "Salida");

View File

@ -102,6 +102,7 @@ public:
display_always_scientific, display_always_scientific,
display_not_always_scientific, display_not_always_scientific,
display_decimal_point, display_decimal_point,
display_deg_red_grad,
convert_type, convert_type,
convert_input, convert_input,
convert_output, convert_output,

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2006-2008, Tomasz Sowa * Copyright (c) 2006-2009, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -419,21 +419,23 @@ HMENU menu = GetMenu(hWnd);
void WmInitDialogCalculateMainWindowSize(HWND hTab) void WmInitDialogCalculateMainWindowSize(HWND hTab)
{ {
RECT r; RECT r_tab, r_main, r_edit2;
GetWindowRect(hTab, &r); GetWindowRect(hTab, &r_tab);
int cy_caption = GetSystemMetrics(SM_CYCAPTION);
int cy_add = 2 * GetSystemMetrics(SM_CYDLGFRAME) +
GetSystemMetrics(SM_CYMENU);
int cx_add = 2 * GetSystemMetrics(SM_CXDLGFRAME) + HWND main = GetPrgRes()->GetMainWindow();
r.right - r.left; GetWindowRect(main, &r_main);
GetPrgRes()->SetYSizeNormal ( 225 + cy_add + cy_caption * 2); HWND output_edit = GetDlgItem(main, IDC_OUTPUT_EDIT);
GetPrgRes()->SetYSizeCompact( 59 + cy_add + cy_caption ); GetWindowRect(output_edit, &r_edit2);
GetPrgRes()->SetXSizeMin ( 4 + cx_add );
int cy_compact = (r_edit2.bottom - r_main.top) + GetSystemMetrics(SM_CYSIZEFRAME);
int cy_normal = (r_tab.bottom - r_tab.top) + (r_tab.top - r_main.top) + GetSystemMetrics(SM_CYSIZEFRAME) + 8;
int cx = r_tab.right - r_tab.left + 2 * GetSystemMetrics(SM_CXSIZEFRAME);
GetPrgRes()->SetYSizeNormal ( cy_normal );
GetPrgRes()->SetYSizeCompact( cy_compact );
GetPrgRes()->SetXSizeMin ( cx );
} }
@ -456,14 +458,18 @@ DLGTEMPLATE * tab1template = (DLGTEMPLATE*)LockResource(tab1global);
int frame_cx = GetSystemMetrics(SM_CXEDGE); int frame_cx = GetSystemMetrics(SM_CXEDGE);
int frame_cy = GetSystemMetrics(SM_CYEDGE); int frame_cy = GetSystemMetrics(SM_CYEDGE);
int caption_cy = GetSystemMetrics(SM_CYCAPTION)+10; // the caption plus some white space int space = 10; // some more space between the tab items and child tabs
RECT tab_item_r;
TabCtrl_GetItemRect(hTab, 0, &tab_item_r);
int tab_item = tab_item_r.bottom;
RECT r; RECT r;
GetWindowRect(hTab, &r); GetWindowRect(hTab, &r);
SetWindowPos(hDialog, HWND_TOP, frame_cx, frame_cy + caption_cy, SetWindowPos(hDialog, HWND_TOP, frame_cx, frame_cy + tab_item + space,
r.right-r.left- 2*frame_cx, r.right-r.left- 2*frame_cx,
r.bottom-r.top- 2*frame_cy - caption_cy, 0); r.bottom-r.top- 2*frame_cy - tab_item - space, 0);
return hDialog; return hDialog;
} }
@ -492,18 +498,24 @@ TCITEM tab_item;
// the name of a tab we'll set when we call the 'SetLanguage()' function // the name of a tab we'll set when we call the 'SetLanguage()' function
tab_item.mask = 0; tab_item.mask = 0;
tab_standard = 0; int tab_inc = 0;
tab_variables = 1;
tab_functions = 2; tab_standard = tab_inc++;
tab_variables = tab_inc++;
tab_functions = tab_inc++;
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
tab_precision = 3; tab_precision = tab_inc++;
tab_display = 4;
tab_convert = 5;
#else #else
tab_precision = -1; // this one will not be used tab_precision = -1; // this one will not be used
tab_display = 3; #endif
tab_convert = 4;
tab_display = tab_inc++;
#ifdef TTCALC_CONVERT
tab_convert = tab_inc++;
#else
tab_convert = -1;
#endif #endif
// this insertion must be in the ascending order // this insertion must be in the ascending order
@ -517,7 +529,10 @@ TCITEM tab_item;
#endif #endif
TabCtrl_InsertItem(hTab, tab_display, &tab_item); TabCtrl_InsertItem(hTab, tab_display, &tab_item);
#ifdef TTCALC_CONVERT
TabCtrl_InsertItem(hTab, tab_convert, &tab_item); TabCtrl_InsertItem(hTab, tab_convert, &tab_item);
#endif
WmInitDialogCreateTab(hTab, tab_standard, IDD_DIALOG_STANDARD, TabWindowProc); WmInitDialogCreateTab(hTab, tab_standard, IDD_DIALOG_STANDARD, TabWindowProc);
WmInitDialogCreateTab(hTab, tab_variables, IDD_DIALOG_VARIABLES, TabWindowProc); WmInitDialogCreateTab(hTab, tab_variables, IDD_DIALOG_VARIABLES, TabWindowProc);
@ -528,7 +543,10 @@ TCITEM tab_item;
#endif #endif
WmInitDialogCreateTab(hTab, tab_display, IDD_DIALOG_DISPLAY, TabWindowProc); WmInitDialogCreateTab(hTab, tab_display, IDD_DIALOG_DISPLAY, TabWindowProc);
#ifdef TTCALC_CONVERT
WmInitDialogCreateTab(hTab, tab_convert, IDD_DIALOG_CONVERT, TabWindowProc); WmInitDialogCreateTab(hTab, tab_convert, IDD_DIALOG_CONVERT, TabWindowProc);
#endif
SetSizeOfDialogs(); SetSizeOfDialogs();
@ -540,7 +558,10 @@ TCITEM tab_item;
#endif #endif
SendMessage(GetPrgRes()->GetTabWindow(tab_display), WM_INIT_TAB_DISPLAY, 0,0); SendMessage(GetPrgRes()->GetTabWindow(tab_display), WM_INIT_TAB_DISPLAY, 0,0);
#ifdef TTCALC_CONVERT
SendMessage(GetPrgRes()->GetTabWindow(tab_convert), WM_INIT_TAB_CONVERT, 0,0); SendMessage(GetPrgRes()->GetTabWindow(tab_convert), WM_INIT_TAB_CONVERT, 0,0);
#endif
TabWindowFunctions::SetLanguage(hTab); TabWindowFunctions::SetLanguage(hTab);
@ -559,7 +580,7 @@ HWND hTab = GetDlgItem(hWnd,IDC_TAB);
WmInitDialogCalculateMainWindowSize(hTab); WmInitDialogCalculateMainWindowSize(hTab);
WmInitDialogCreateAndInitTabs(hTab); WmInitDialogCreateAndInitTabs(hTab);
HICON program_icon = LoadIcon(GetPrgRes()->GetInstance(),MAKEINTRESOURCE(IDI_ICON1)); HICON program_icon = LoadIcon(GetPrgRes()->GetInstance(),MAKEINTRESOURCE(IDI_ICON2));
if( program_icon ) if( program_icon )
SendMessage(hWnd,WM_SETICON,ICON_BIG,(LPARAM)program_icon); SendMessage(hWnd,WM_SETICON,ICON_BIG,(LPARAM)program_icon);
@ -616,7 +637,6 @@ MINMAXINFO * lpmmi = (LPMINMAXINFO) lParam;
if( GetPrgRes()->GetView() == ProgramResources::view_normal ) if( GetPrgRes()->GetView() == ProgramResources::view_normal )
{ {
lpmmi->ptMinTrackSize.y = GetPrgRes()->GetYSizeNormal(); lpmmi->ptMinTrackSize.y = GetPrgRes()->GetYSizeNormal();
//lpmmi->ptMaxTrackSize.y = cy_normalny;
} }
else else
{// kompaktowy {// kompaktowy

View File

@ -95,16 +95,19 @@ ttmath::ErrorCode ParserManager::Parse()
{ {
case 0: case 0:
parser1.SetBase(base_input); parser1.SetBase(base_input);
parser1.SetDegRadGrad(angle_deg_rad_grad);
code = parser1.Parse(buffer); code = parser1.Parse(buffer);
break; break;
case 1: case 1:
parser2.SetBase(base_input); parser2.SetBase(base_input);
parser2.SetDegRadGrad(angle_deg_rad_grad);
code = parser2.Parse(buffer); code = parser2.Parse(buffer);
break; break;
default: default:
parser3.SetBase(base_input); parser3.SetBase(base_input);
parser3.SetDegRadGrad(angle_deg_rad_grad);
code = parser3.Parse(buffer); code = parser3.Parse(buffer);
break; break;
} }
@ -112,6 +115,7 @@ ttmath::ErrorCode ParserManager::Parse()
#else #else
parser1.SetBase(base_input); parser1.SetBase(base_input);
parser1.SetDegRadGrad(angle_deg_rad_grad);
code = parser1.Parse(buffer); code = parser1.Parse(buffer);
#endif #endif
@ -145,12 +149,13 @@ unsigned int i;
base_input = GetPrgRes()->GetBaseInput(); base_input = GetPrgRes()->GetBaseInput();
base_output = GetPrgRes()->GetBaseOutput(); base_output = GetPrgRes()->GetBaseOutput();
always_scientific = GetPrgRes()->GetDisplayAlwaysScientific(); always_scientific = GetPrgRes()->GetDisplayAlwaysScientific();
when_scientific = GetPrgRes()->GetDisplayWhenScientific(); when_scientific = GetPrgRes()->GetDisplayWhenScientific();
rounding = GetPrgRes()->GetDisplayRounding(); rounding = GetPrgRes()->GetDisplayRounding();
precision = GetPrgRes()->GetPrecision(); precision = GetPrgRes()->GetPrecision();
remove_zeroes = GetPrgRes()->GetRemovingZeroes(); remove_zeroes = GetPrgRes()->GetRemovingZeroes();
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage(); angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
conv_type = GetPrgRes()->GetConvert()->GetCurrentType(); conv_type = GetPrgRes()->GetConvert()->GetCurrentType();
GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit); GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit);

View File

@ -136,7 +136,7 @@ private:
Languages::Country country; Languages::Country country;
ttmath::ErrorCode code; ttmath::ErrorCode code;
char decimal_point; char decimal_point;
int angle_deg_rad_grad;
/* /*
some buffers which we use in some method in the second thread, some buffers which we use in some method in the second thread,

View File

@ -208,6 +208,25 @@ bool ProgramResources::GetRemovingZeroes()
return remove_zeroes; return remove_zeroes;
} }
void ProgramResources::SetDegRadGrad(int angle)
{
if( angle < 0 || angle > 2 )
angle = 1;
angle_deg_rad_grad = angle;
}
int ProgramResources::GetDegRadGrad()
{
return angle_deg_rad_grad;
}
void ProgramResources::SetDisplayAlwaysScientific(bool a) void ProgramResources::SetDisplayAlwaysScientific(bool a)
{ {
display_always_scientific = a; display_always_scientific = a;
@ -426,13 +445,14 @@ ProgramResources::ProgramResources()
y_size_compact = 0; y_size_compact = 0;
x_size_min = 0; x_size_min = 0;
// !!! wrzucic do kontruktora Convert // !!! put into Convert constructor
#ifdef TTCALC_CONVERT
convert.Init(); convert.Init();
#endif
decimal_point = 0; decimal_point = 0;
angle_deg_rad_grad = 1; // rad is default
} }
@ -649,6 +669,7 @@ std::string ini_value[20];
iparser.Associate( "global|language", &ini_value[13] ); iparser.Associate( "global|language", &ini_value[13] );
iparser.Associate( "global|disp.dec.point", &ini_value[14] ); iparser.Associate( "global|disp.dec.point", &ini_value[14] );
iparser.Associate( "global|disp.remove.zeroes", &ini_value[15] ); iparser.Associate( "global|disp.remove.zeroes", &ini_value[15] );
iparser.Associate( "global|disp.deg_rad_grad", &ini_value[16] );
iparser.Associate( "variables", &temp_variables ); iparser.Associate( "variables", &temp_variables );
iparser.Associate( "functions", &temp_functions ); iparser.Associate( "functions", &temp_functions );
@ -704,7 +725,7 @@ std::string ini_value[20];
languages.SetCurrentLanguage(Languages::en); languages.SetCurrentLanguage(Languages::en);
SetDecimalPoint( atoi(ini_value[14].c_str()) ); SetDecimalPoint( atoi(ini_value[14].c_str()) );
SetDegRadGrad( atoi(ini_value[16].c_str()) );
if( err != IniParser::err_ok ) if( err != IniParser::err_ok )
bad_line = iparser.GetBadLine(); bad_line = iparser.GetBadLine();
@ -742,6 +763,8 @@ std::ofstream file( configuration_file.c_str() );
file << "disp.rounding = " << display_rounding << std::endl; file << "disp.rounding = " << display_rounding << std::endl;
file << "disp.remove.zeroes = " << (int)remove_zeroes << std::endl; file << "disp.remove.zeroes = " << (int)remove_zeroes << std::endl;
file << "disp.dec.point = " << decimal_point << std::endl; file << "disp.dec.point = " << decimal_point << std::endl;
file << "disp.deg_rad_grad = " << angle_deg_rad_grad << std::endl;
file << "\n[variables]\n"; file << "\n[variables]\n";

View File

@ -293,6 +293,14 @@ public:
bool GetRemovingZeroes(); bool GetRemovingZeroes();
/*!
setting and returning the unit of angle in which sin/cos/tan/ctg (arc sin...) operate
0 - deg
1 - red
2 - grad
*/
void SetDegRadGrad(int angle);
int GetDegRadGrad();
private: private:
@ -340,6 +348,7 @@ private:
int display_when_scientific; int display_when_scientific;
int display_rounding; int display_rounding;
bool remove_zeroes; bool remove_zeroes;
int angle_deg_rad_grad;
int bad_line; int bad_line;

View File

@ -62,7 +62,8 @@
#define IDR_MENU 200 #define IDR_MENU 200
#define IDC_TAB 1010 #define IDC_TAB 1010
#define IDI_ICON1 104 #define IDI_ICON2 104
#define IDI_ICON1 105
#define IDC_INPUT_EDIT 1000 #define IDC_INPUT_EDIT 1000
#define IDC_OUTPUT_EDIT 1001 #define IDC_OUTPUT_EDIT 1001
@ -165,6 +166,8 @@
#define IDC_LABEL_DECIMAL_POINT 1169 #define IDC_LABEL_DECIMAL_POINT 1169
#define IDC_COMBO_DECIMAL_POINT 1170 #define IDC_COMBO_DECIMAL_POINT 1170
#define IDC_CHECK_REMOVE_ZEROES 1171 #define IDC_CHECK_REMOVE_ZEROES 1171
#define IDC_LABEL_DISPLAY_DEG_RAD_GRAD 1172
#define IDC_COMBO_DEG_RAD_GRAD 1173
// convert tab // convert tab

View File

@ -4,7 +4,10 @@
LANGUAGE LANG_POLISH, 1 LANGUAGE LANG_POLISH, 1
104 ICON "..\\res\\icon01.ico" 104 ICON "..\\res\\icon02.ico"
LANGUAGE LANG_POLISH, 2
105 ICON "..\\res\\icon01.ico"
#include "resource.h" #include "resource.h"
@ -56,10 +59,11 @@ FONT 8, "Ms Shell Dlg"
BEGIN BEGIN
CONTROL "",1000,"EDIT",ES_AUTOHSCROLL |ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,0,6,260,14 CONTROL "",1000,"EDIT",ES_AUTOHSCROLL |ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,0,6,260,14
CONTROL "",1001,"EDIT",ES_READONLY |ES_AUTOHSCROLL |ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,0,21,260,14 CONTROL "",1001,"EDIT",ES_READONLY |ES_AUTOHSCROLL |ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,0,21,260,14
CONTROL "",1010,"SysTabControl32",WS_CHILD |WS_TABSTOP |WS_GROUP| WS_VISIBLE ,0,39,261,110, WS_EX_CONTROLPARENT CONTROL "",1010,"SysTabControl32",WS_CHILD |WS_TABSTOP |WS_GROUP| WS_VISIBLE ,0,39,261,106, WS_EX_CONTROLPARENT
END END
102 DIALOG DISCARDABLE 0, 0, 358, 61 102 DIALOG DISCARDABLE 0, 0, 358, 61
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU WS_CAPTION | WS_SYSMENU
@ -181,22 +185,29 @@ STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP |
CAPTION "tab5" CAPTION "tab5"
FONT 8, "Ms Shell Dlg" FONT 8, "Ms Shell Dlg"
BEGIN BEGIN
COMBOBOX 1156,58,5,69,200,CBS_DROPDOWNLIST | WS_GROUP | COMBOBOX 1156,58,5,58,200,CBS_DROPDOWNLIST | WS_GROUP |
WS_TABSTOP WS_TABSTOP
COMBOBOX 1157,58,19,69,200,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX 1157,58,19,58,200,CBS_DROPDOWNLIST | WS_TABSTOP
LTEXT "Input",1162,11,7,27,8 CONTROL "Input",1162,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,11,7,
LTEXT "Output",1163,11,22,29,8 43,8
LTEXT "Rounding",1164,11,36,43,8 CONTROL "Output",1163,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,11,
LTEXT "Decimal point",1169,178,21,68,8 22,43,8
COMBOBOX 1170,143,19,29,62,CBS_DROPDOWNLIST | WS_TABSTOP COMBOBOX 1159,58,33,58,200,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "Rounding",1164,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,11,
36,43,8
COMBOBOX 1173,213,5,38,54,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "sin/cos asin/acos",1172,"Static",SS_LEFTNOWORDWRAP |
WS_GROUP,137,7,73,8
COMBOBOX 1170,213,19,38,62,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "Decimal point",1169,"Static",SS_LEFTNOWORDWRAP |
WS_GROUP,137,22,73,8
CONTROL "remove trailing zeroes",1171,"Button",BS_AUTOCHECKBOX | CONTROL "remove trailing zeroes",1171,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,143,35,111,10 BS_LEFTTEXT | BS_LEFT | WS_TABSTOP,136,36,115,10
COMBOBOX 1159,58,33,69,200,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "Always",1160,"Button",BS_AUTORADIOBUTTON | BS_LEFT | CONTROL "Always",1160,"Button",BS_AUTORADIOBUTTON | BS_LEFT |
WS_GROUP | WS_TABSTOP,19,65,44,10 WS_GROUP | WS_TABSTOP,19,65,54,10
CONTROL "When the exponent is greater than:",1161,"Button", CONTROL "When the exponent is greater than:",1161,"Button",
BS_AUTORADIOBUTTON | BS_LEFT,77,65,130,10 BS_AUTORADIOBUTTON | BS_LEFT,77,65,138,10
EDITTEXT 1166,211,63,29,14,ES_NUMBER | WS_GROUP EDITTEXT 1166,217,63,29,14,ES_NUMBER | WS_GROUP
CONTROL "",1165,"msctls_updown32",UDS_SETBUDDYINT | CONTROL "",1165,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_ARROWKEYS,201,73,11,14 UDS_ALIGNRIGHT | UDS_ARROWKEYS,201,73,11,14
GROUPBOX "Print scientific value",1168,11,51,240,31 GROUPBOX "Print scientific value",1168,11,51,240,31
@ -204,6 +215,9 @@ END
#ifdef TTCALC_CONVERT
115 DIALOG DISCARDABLE 0, 0, 260, 90 115 DIALOG DISCARDABLE 0, 0, 260, 90
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP | STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP |
WS_TABSTOP WS_TABSTOP
@ -234,6 +248,8 @@ BEGIN
BS_AUTOCHECKBOX | WS_TABSTOP,162,74,88,10 BS_AUTOCHECKBOX | WS_TABSTOP,162,74,88,10
END END
#endif
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
200 DIALOG DISCARDABLE 0, 0, 349, 202 200 DIALOG DISCARDABLE 0, 0, 349, 202
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |

View File

@ -413,7 +413,6 @@ int i;
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_RESETCONTENT, 0, 0); SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_RESETCONTENT, 0, 0);
// SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)GetPrgRes()->GetLanguages()->GuiMessage(Languages::combo_rounding_cut_last_digits) );
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)GetPrgRes()->GetLanguages()->GuiMessage(Languages::combo_rounding_none) ); SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)GetPrgRes()->GetLanguages()->GuiMessage(Languages::combo_rounding_none) );
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)GetPrgRes()->GetLanguages()->GuiMessage(Languages::combo_rounding_integer) ); SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)GetPrgRes()->GetLanguages()->GuiMessage(Languages::combo_rounding_integer) );
@ -447,6 +446,8 @@ int i;
SetDlgItemText(hWnd, IDC_LABEL_DECIMAL_POINT, GetPrgRes()->GetLanguages()->GuiMessage(Languages::display_decimal_point)); SetDlgItemText(hWnd, IDC_LABEL_DECIMAL_POINT, GetPrgRes()->GetLanguages()->GuiMessage(Languages::display_decimal_point));
SetDlgItemText(hWnd, IDC_CHECK_REMOVE_ZEROES, GetPrgRes()->GetLanguages()->GuiMessage(Languages::check_remove_zeroes)); SetDlgItemText(hWnd, IDC_CHECK_REMOVE_ZEROES, GetPrgRes()->GetLanguages()->GuiMessage(Languages::check_remove_zeroes));
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_DEG_RAD_GRAD, GetPrgRes()->GetLanguages()->GuiMessage(Languages::display_deg_red_grad));
} }
@ -669,17 +670,17 @@ TCITEM tab;
TabCtrl_SetItem(hTab,tab_functions, &tab); TabCtrl_SetItem(hTab,tab_functions, &tab);
#ifndef TTCALC_PORTABLE #ifndef TTCALC_PORTABLE
tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_precision) ); tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_precision) );
TabCtrl_SetItem(hTab,tab_precision, &tab); TabCtrl_SetItem(hTab,tab_precision, &tab);
#endif #endif
tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_display) ); tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_display) );
TabCtrl_SetItem(hTab,tab_display, &tab); TabCtrl_SetItem(hTab,tab_display, &tab);
#ifdef TTCALC_CONVERT
tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_convert) ); tab.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::tab_convert) );
TabCtrl_SetItem(hTab,tab_convert, &tab); TabCtrl_SetItem(hTab,tab_convert, &tab);
#endif
SetLanguageTabStandard( GetPrgRes()->GetTabWindow(tab_standard) ); SetLanguageTabStandard( GetPrgRes()->GetTabWindow(tab_standard) );
SetLanguageTabVariables( GetPrgRes()->GetTabWindow(tab_variables) ); SetLanguageTabVariables( GetPrgRes()->GetTabWindow(tab_variables) );
@ -690,7 +691,10 @@ TCITEM tab;
#endif #endif
SetLanguageTabDisplay( GetPrgRes()->GetTabWindow(tab_display) ); SetLanguageTabDisplay( GetPrgRes()->GetTabWindow(tab_display) );
#ifdef TTCALC_CONVERT
SetLanguageTabConvert( GetPrgRes()->GetTabWindow(tab_convert) ); SetLanguageTabConvert( GetPrgRes()->GetTabWindow(tab_convert) );
#endif
InvalidateRect(hTab, 0, false); InvalidateRect(hTab, 0, false);
} }
@ -818,6 +822,18 @@ BOOL WmTabCommand_RemoveZeroesChanged(HWND hWnd, UINT message, WPARAM wParam, LP
return true; return true;
} }
BOOL WmTabCommand_DisplayDegRadGradChanged(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if( HIWORD(wParam) != CBN_SELCHANGE )
return false;
GetPrgRes()->GetThreadController()->StopCalculating();
GetPrgRes()->SetDegRadGrad( (int)SendDlgItemMessage(hWnd, IDC_COMBO_DEG_RAD_GRAD, CB_GETCURSEL, 0, 0) );
GetPrgRes()->GetThreadController()->StartCalculating();
return true;
}
void SetDisablingDisplayWhenScientific(HWND hWnd) void SetDisablingDisplayWhenScientific(HWND hWnd)
{ {
@ -981,8 +997,7 @@ void CreateTabCommandMessagesTable(Messages & cmessages)
cmessages.Associate(IDC_RADIO_DISPLAY_NOT_ALWAYS_SCIENTIFIC, WmTabCommand_SetDisplayNotAlwaysScientific); cmessages.Associate(IDC_RADIO_DISPLAY_NOT_ALWAYS_SCIENTIFIC, WmTabCommand_SetDisplayNotAlwaysScientific);
cmessages.Associate(IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC, WmTabCommand_SetDisplayWhenScientific); cmessages.Associate(IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC, WmTabCommand_SetDisplayWhenScientific);
cmessages.Associate(IDC_COMBO_DECIMAL_POINT, WmTabCommand_DisplayDecimalPointChanged); cmessages.Associate(IDC_COMBO_DECIMAL_POINT, WmTabCommand_DisplayDecimalPointChanged);
cmessages.Associate(IDC_COMBO_DEG_RAD_GRAD, WmTabCommand_DisplayDegRadGradChanged);
} }
@ -1245,6 +1260,15 @@ char buffer[20];
if( GetPrgRes()->GetRemovingZeroes() ) if( GetPrgRes()->GetRemovingZeroes() )
CheckDlgButton(hWnd, IDC_CHECK_REMOVE_ZEROES, BST_CHECKED); CheckDlgButton(hWnd, IDC_CHECK_REMOVE_ZEROES, BST_CHECKED);
SendDlgItemMessage(hWnd, IDC_COMBO_DEG_RAD_GRAD, CB_ADDSTRING, 0, (LPARAM)"deg");
SendDlgItemMessage(hWnd, IDC_COMBO_DEG_RAD_GRAD, CB_ADDSTRING, 0, (LPARAM)"rad");
SendDlgItemMessage(hWnd, IDC_COMBO_DEG_RAD_GRAD, CB_ADDSTRING, 0, (LPARAM)"grad");
SendDlgItemMessage(hWnd, IDC_COMBO_DEG_RAD_GRAD, CB_SETCURSEL, GetPrgRes()->GetDegRadGrad(), 0);
return true; return true;
} }
@ -1283,10 +1307,6 @@ BOOL WmNotify(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
NMHDR * pnmh = (LPNMHDR) lParam; NMHDR * pnmh = (LPNMHDR) lParam;
HWND var_list = GetDlgItem(hWnd,IDC_VARIABLES_LIST); HWND var_list = GetDlgItem(hWnd,IDC_VARIABLES_LIST);
HWND fun_list = GetDlgItem(hWnd,IDC_FUNCTIONS_LIST); HWND fun_list = GetDlgItem(hWnd,IDC_FUNCTIONS_LIST);
HWND conv_list1 = GetDlgItem(hWnd,IDC_LIST_UNIT_TYPE);
HWND conv_list2b = GetDlgItem(hWnd,IDC_LIST_UNIT_INPUT2);
HWND conv_list3b = GetDlgItem(hWnd,IDC_LIST_UNIT_OUTPUT2);
if( pnmh->hwndFrom == var_list ) if( pnmh->hwndFrom == var_list )
@ -1337,6 +1357,11 @@ HWND conv_list3b = GetDlgItem(hWnd,IDC_LIST_UNIT_OUTPUT2);
} }
#ifdef TTCALC_CONVERT
HWND conv_list1 = GetDlgItem(hWnd,IDC_LIST_UNIT_TYPE);
HWND conv_list2b = GetDlgItem(hWnd,IDC_LIST_UNIT_INPUT2);
HWND conv_list3b = GetDlgItem(hWnd,IDC_LIST_UNIT_OUTPUT2);
if( pnmh->hwndFrom==conv_list1 || pnmh->hwndFrom==conv_list2b || pnmh->hwndFrom==conv_list3b ) if( pnmh->hwndFrom==conv_list1 || pnmh->hwndFrom==conv_list2b || pnmh->hwndFrom==conv_list3b )
{ {
if( pnmh->code == LVN_ITEMCHANGED ) if( pnmh->code == LVN_ITEMCHANGED )
@ -1355,7 +1380,7 @@ HWND conv_list3b = GetDlgItem(hWnd,IDC_LIST_UNIT_OUTPUT2);
} }
} }
} }
#endif
return false; return false;
} }
@ -1375,7 +1400,10 @@ void CreateTabMessagesTable(Messages & messages)
#endif #endif
messages.Associate(WM_INIT_TAB_DISPLAY, WmInitTabDisplay); messages.Associate(WM_INIT_TAB_DISPLAY, WmInitTabDisplay);
#ifdef TTCALC_CONVERT
messages.Associate(WM_INIT_TAB_CONVERT, WmInitTabConvert); messages.Associate(WM_INIT_TAB_CONVERT, WmInitTabConvert);
#endif
messages.Associate(WM_NOTIFY, WmNotify); messages.Associate(WM_NOTIFY, WmNotify);
} }

View File

@ -46,7 +46,6 @@
#include <string> #include <string>
/*! /*!
the application starts here the application starts here
*/ */
@ -72,7 +71,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
if( !GetPrgRes()->GetThreadController()->Init() ) if( !GetPrgRes()->GetThreadController()->Init() )
return ShowError( Languages::cant_init_calculations ); return ShowError( Languages::cant_init_calculations );
unsigned int thread_id; unsigned int thread_id;
uintptr_t thread_handle; uintptr_t thread_handle;
if( (thread_handle = _beginthreadex(0,0,CalculationsProcedure, 0, 0, &thread_id)) == 0 ) if( (thread_handle = _beginthreadex(0,0,CalculationsProcedure, 0, 0, &thread_id)) == 0 )
return ShowError( Languages::cant_create_thread ); return ShowError( Languages::cant_create_thread );