Make DetermineDigits() reusable in other ports
Move this function, and the associated constant, to common code. This required moving wxSpinCtrlDouble::Create() implementation to the source file, but there are no real changes.
This commit is contained in:
@@ -28,6 +28,14 @@ extern wxSize GetBestSize(const wxControl* spin, int minVal, int maxVal, int bas
|
||||
|
||||
// Helper function to check if given combination of range and base is valid.
|
||||
extern bool IsBaseCompatibleWithRange(int minVal, int maxVal, int base);
|
||||
|
||||
// Maximum number of digits returned by DetermineDigits().
|
||||
const unsigned SPINCTRLDBL_MAX_DIGITS = 20;
|
||||
|
||||
// Return the number of digits required to show the numbers using the
|
||||
// specified increment without loss of precision.
|
||||
extern unsigned DetermineDigits(double inc);
|
||||
|
||||
} // namespace wxSpinCtrlImpl
|
||||
|
||||
#endif // _WX_PRIVATE_SPINCTRL_H_
|
||||
|
Reference in New Issue
Block a user