|
Dann lern' doch erst mal Englisch.
Das Beispielbild mit dem Text "1.1 The Time-Indipendent ..."
ist doch einfach nur peinlich.
-------------------------
Just learn some english. The sample image containing the
text "1.1 The Time-Indipendent ..." is embarassing.
|
|
|
|
|
mwahahahahhhh
et mon cul, il sent la rose ????
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanks
Boat Zhou
|
|
|
|
|
I have no use for anything like this as of now, but my GOD!!! I've never seen code rated 170 times and still have a 4.96 for a score...thats crazy!!!
That alone deserves a 5....
Cheers
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
It's too Cool! Great job!
|
|
|
|
|
The Formula Editor's code is very Good .
Could you tell me How use a Carray?
|
|
|
|
|
for example:
a/b=c+squareroot(d/(e+f/(g+h/i)))
will display incorrectly
|
|
|
|
|
The file i downloaded is corrupted,does anyone know this?
|
|
|
|
|
They checked out just fine on my system. If you are using XP, either clear your IE cache or save the zip files to disk and then open.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Yes, when i clear the IE cache, all is clear now.
Thank you very much!
|
|
|
|
|
this is looks like quick sample, not a serious job. The content of the window is blinking and there is no keyboard input. No drag-drop feature. MFC only.
|
|
|
|
|
Which system do you use? I can't reproduce this behaviour...
tbw
|
|
|
|
|
win2000, sp3, ie6
i guess flickering doesn't depends on system settings. keyboard input present, but it is extremely uncomfortable. I didn't want to say that it is bad, i just say it is unfinished work (may be for internal use only). Note, that not all users use mouse input - in your sample there is no way to create formula with keyboard only (may be i miss something?)
|
|
|
|
|
Alex Mol wrote:
may be i miss something?)
No! it is really not working correctly as it should. I gave 5 points for a good start, there is still a lot of works to do.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
(in German)
Sehr gute Arbeit, besser hätte man es kaum machen können
Achja, Grüße aus Oberhausen
Gruß
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
It is unpleasant to be the one who breaks the chain of "Hey man, great work... congrats!" but I just tried to select the Sum sign in the given sample and it had this unexpected behavior: when you hover the mouse on it no focus appears, while if you move the mouse a little bit on the right, just under the argument the focus appears.
I tried to find the cause, but it's just too hard to do at a first sight. But it should be quite easy for you, it doesn't seem a serious one!
Btw, great article!
Paolo
------
Why spend 2 minutes doing it by hand when you can spend all night plus most of the following day writing a system to do it for you? - (Chris Maunder)
|
|
|
|
|
Hi Paolo,
you're right. The behaviour of the sum-, integral-, and the productnode is not as it should be. As I mentioned in the article the implemenation of the node-entities is just an example ...
To fix that wrong behaviour you just have to override the method
virtual CNode* GetNodeFromPoint(CDC* pDC, CRect& rect, CPoint point); in the class-declaration of CSumNode (and also the CProdNode and CIntegralNode )
The implementation of the overridden methods looks like this:
CNode* CSumNode::GetNodeFromPoint(CDC* pDC, CRect& rect, CPoint point)
{
CRect contentRect(0,0,0,0);
CRect leftRect(0,0,0,0);
CRect rightRect(0,0,0,0);
CNode* pNode=NULL;
if(m_pLeftChild)
leftRect=m_pLeftChild->GetRect(pDC);
contentRect=GetContentRect(pDC);
if(m_pRightChild)
rightRect=m_pRightChild->GetRect(pDC);
TransformRects(rect, leftRect, rightRect, contentRect);
if(rightRect.PtInRect(point))
if(m_pRightChild)
{
pNode=m_pRightChild->GetNodeFromPoint(pDC, rightRect, point);
rect=rightRect;
return pNode;
}
if(contentRect.PtInRect(point))
{
rect=contentRect;
return this;
}
if(leftRect.PtInRect(point))
if(m_pLeftChild)
{
pNode=m_pLeftChild->GetNodeFromPoint(pDC, leftRect, point);
rect=leftRect;
return pNode;
}
return this;
}
The only difference is tree-traversal-algorithm. It has changed form postorder to inorder. Thats it...
thank you for the hint...
tbw
|
|
|
|
|
I applied the changes and now it works great!
The sum sign is still detected when cursor is below the argument, but the important thing is it gets detected when the cursor is over it.
So what about and intermediate class that just implements the different tree-traversal algorithm? CNodeInOrder or something like that...
Since you could have many operators that require that change, this could save many code repetitions.
Paolo
------
Why spend 2 minutes doing it by hand when you can spend all night plus most of the following day writing a system to do it for you? - (Chris Maunder)
|
|
|
|
|
Hi Paolo,
I thought about your suggestion, and when I looked into the code, I realized that CRangeNode is the evil guy, who makes the trouble. Therefore I think it's better to fix the CRangeNode .
Modify the original GetNodeFromPoint method in the following manner.
// return the node of a given point (mouse coordinate)
CNode* CNode::GetNodeFromPoint(CDC* pDC, CRect& rect, CPoint point)
{
CRect contentRect(0,0,0,0);
CRect leftRect(0,0,0,0);
CRect rightRect(0,0,0,0);
CNode* pNode=NULL;
if(m_pLeftChild)
leftRect=m_pLeftChild->GetRect(pDC);
contentRect=GetContentRect(pDC);
if(m_pRightChild)
rightRect=m_pRightChild->GetRect(pDC);
TransformRects(rect, leftRect, rightRect, contentRect);
if(leftRect.PtInRect(point))
if(m_pLeftChild)
{
pNode=m_pLeftChild->GetNodeFromPoint(pDC, leftRect, point);
rect=leftRect;
if(pNode)
return pNode;
}
if(rightRect.PtInRect(point))
if(m_pRightChild)
{
pNode=m_pRightChild->GetNodeFromPoint(pDC, rightRect, point);
rect=rightRect;
if(pNode)
return pNode;
}
if(contentRect.PtInRect(point))
{
rect=contentRect;
return this;
}
return this;
}
the only difference are the conditions if(pNode) before the return pNode; lines.
In the next step override the GetNodeFromPoint only for the CRangeNode in the following way:
CNode* CRangeNode::GetNodeFromPoint(CDC* pDC, CRect& rect, CPoint point)
{
CRect contentRect(0,0,0,0);
CRect leftRect(0,0,0,0);
CRect rightRect(0,0,0,0);
CNode* pNode=NULL;
if(m_pLeftChild)
leftRect=m_pLeftChild->GetRect(pDC);
contentRect=GetContentRect(pDC);
if(m_pRightChild)
rightRect=m_pRightChild->GetRect(pDC);
TransformRects(rect, leftRect, rightRect, contentRect);
if(rightRect.PtInRect(point))
if(m_pRightChild)
{
pNode=m_pRightChild->GetNodeFromPoint(pDC, rightRect, point);
rect=rightRect;
return pNode;
}
if(leftRect.PtInRect(point))
if(m_pLeftChild)
{
pNode=m_pLeftChild->GetNodeFromPoint(pDC, leftRect, point);
rect=leftRect;
return pNode;
}
return NULL;
}
The modified lines are commented. This solution should work for all nodes that work with CRangeNode as a child and leaves the class-hierarchy untouched....
tbw
|
|
|
|
|
I was thinking of doing this a while ago, but I'm not really a graphics person. I'd get bogged down in trying to make it look ok
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
|
few suggestions:
- make editing more intuitive, this is a big plus
- have exporting as vector graphics (WMF maybe?)
- have zooming, etc.
- customizable space between various expressions (e.g. x^2.. the 2 is too far away from the x)
- multiple binary relations in one equation (for example: if x = y then a = b... x = y --> a = b)
i was planning on making a revolutionary thing like this... seems like i wont need to anymore
good job!
Roman Nurik
|
|
|
|
|
Hi Roman,
thanx for your suggestions,
to export into WMF just add the following method into CBinTree :
BOOL CBinTree::WriteWMF(CString strFile)
{
CDC DC;
CDC* pDC = NULL;
CMetaFileDC MetaDC;
HENHMETAFILE hEnhMetaFile;
DC.CreateCompatibleDC(NULL);
CRect rectMeta(0,0,0,0);
CRect rect=GetRect(&DC);
rectMeta.right = MulDiv(rect.Width()*100, DC.GetDeviceCaps(HORZSIZE),
DC.GetDeviceCaps(HORZRES));
rectMeta.bottom = MulDiv(rect.Height()*100, DC.GetDeviceCaps(VERTSIZE),
DC.GetDeviceCaps(VERTRES));
MetaDC.CreateEnhanced(&DC, NULL, rectMeta, _T("Formula\0Image\0\0"));
MetaDC.SetAttribDC(DC.m_hDC);
MetaDC.SetMapMode(MM_TEXT);
pDC = &MetaDC;
CBrush brush;
brush.CreateSysColorBrush(COLOR_WINDOW);
pDC->FillRect(rect, &brush);
brush.DeleteObject();
DrawTree(pDC, rect);
hEnhMetaFile=MetaDC.CloseEnhanced();
BOOL bRet = FALSE;
HENHMETAFILE hMetaCopy = ::CopyEnhMetaFile(hEnhMetaFile, strFile);
if (hMetaCopy)
{
bRet = TRUE;
DeleteEnhMetaFile(hMetaCopy);
}
DeleteEnhMetaFile(hEnhMetaFile);
return bRet;
}
Then you can choose one of the export-methods. I will collect the suggestions and put them into an update soon...
tbw
|
|
|
|
|
However, after reading WREY's post I need a drink. Chaulk up another 5.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
First off, very nice. Second, thank you for donating it to the community; obviously, you put a lot of effort into it. It will make my engineering calculator much, much better looking..
And finally, a criticism: Even though this is a UI control, it might have made sense to create abstractions of operators and operands. The first thing I wanted to do with my snazzy function was evaluate it. I was dissapointed to find no good place to hook-in evaluation code. Are you familiar with Ian Ollmann's Parser/Evaluator?
|
|
|
|
|