[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Refactor CBalloon code

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-09-05 16:19:23 CEST

* Removed repeating comments about compilation on NT4 & Win95,
  since these platforms are no longer supported
* Simplified USE_GDI_GRADIENT usage with additional macro
* Common subexpressions extracted is a few functions
* Removed unused parameters and local variables
* Fixed incorrect behavior of tooltip close button when user presses mouse
  button over it, but releases away from it, or vice versa.
* Converted ShowBalloon functions to void, since their return value
was not safe to use.

---
These are changes I made while trying to understand the logic and
structure of CBalloon class in order to try implementing
BALLOON_BORDER_ANCHOR style we discussed earlier.
There are still things I not fully clear to me:
1) Is there a useful case when m_pParentWnd == NULL?
If not, the assertion can be added to Create() function and the rest
of the code simplified.
2) What should BALLOON_MULTIPLE_SHOW do? It seems to be unused, and I
did not understand intended functionality from neither code not
comment.
3) Is BALLOON_TRACK_MOUSE behavior used anywhere? It seems not, but at
least it is obvious what that one should do.
I tested it, and found that BALLOON_TRACK_MOUSE has very minor visual
glitch when combined with BALLOON_SHADOW style. Not sure it is worth
fixing.
4) What is the intended relationship between BALLOON_INFO::nBehaviour
and CBalloon::m_nBehaviour? Currently it is rather convoluted, as e.g.
BALLOON_DIALOG works when set in latter, but not in former, etc.
5) Out of six defined overloads for ShowBalloon function, only one is
actually used, and each caller passes GetCtrlCentre as a second
argument.
I understand that interface was intended to be general, but perhaps it
is a little overkill? Should I simplify it and reduce the number of
overloads?
-- 
Alexander S. Klenin
Insight Experts Ltd.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org

Received on Wed Sep 5 16:16:18 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.