[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] axes editing controls

From: Vaclav Slavik
Subject: [lmi] axes editing controls
Date: Wed, 21 Nov 2007 00:51:02 +0100
User-agent: KMail/1.9.7


I'm looking at the axes editing code in product editor patch and have 
some questions about it and the code that deals with setting axis' 
value (for the 3rd and more axes that are not shown in the grid) and 
adjusting max value in the grid in particular:

Currently, both of these controls are always implemented as wxChoice, 
even for axes like Issue Age or Duration, where the list of allowed 
values is rather large integer range. Would wxSpinCtrl be better 
suited here? Picking Duration value from 100-items choice control 
that doesn't even fit on screen and needs scrolling under wxGTK can 
be a bit tiresome...

I'm asking, because even though the code uses wxChoice, 
MultiDimAxisAny and related classes use more generic wxWindow in 
their API instead of wxChoice or some wxChoice-derived class. This 
design makes it possible to use any controls for axis' value 
selector, but on the other hand, it uses several dynamic_casts to 
accomplish this and that's something I'd rather avoid if I can.

Clearly, if the GUI should use wxChoice for all axes, then the code 
could be simplified -- it could use SomeChoiceClass instead of 
wxWindow in MultiDimAxisAny and friends and avoid dynamic_casts 
completely. But if it makes sense to use different controls (be it 
wxSpinCtrl for Age an Duration as I suggest above or some other 
control for another axis), then MultiDimAxisAny should continue to 
use wxWindow (or some other class more generic that wxChoice) in its 

PGP key: 0x465264C9, available from http://pgp.mit.edu/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]