Audacity  2.2.0
NumericTextCtrl Class Referencefinal

#include <NumericTextCtrl.h>

Inheritance diagram for NumericTextCtrl:
NumericConverter

Public Member Functions

 NumericTextCtrl (NumericConverter::Type type, wxWindow *parent, wxWindowID id, const wxString &formatName=wxEmptyString, double value=0.0, double sampleRate=44100, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, bool autoPos=false)
 
virtual ~NumericTextCtrl ()
 
bool Layout () override
 
void Fit () override
 
void SetSampleRate (double sampleRate)
 
void SetValue (double newValue)
 
void SetFormatString (const wxString &formatString)
 
void SetFormatName (const wxString &formatName)
 
void SetFieldFocus (int)
 
void SetReadOnly (bool readOnly=true)
 
void EnableMenu (bool enable=true)
 
void SetInvalidValue (double invalidValue)
 
int GetFocusedField ()
 
int GetFocusedDigit ()
 
- Public Member Functions inherited from NumericConverter
 NumericConverter (Type type, const wxString &formatName=wxEmptyString, double value=0.0f, double sampleRate=1.0f)
 
virtual ~NumericConverter ()
 
virtual void ValueToControls (double rawValue, bool nearest=true)
 
virtual void ParseFormatString (const wxString &format)
 
void PrintDebugInfo ()
 
void SetFormatName (const wxString &formatName)
 
void SetFormatString (const wxString &formatString)
 
void SetSampleRate (double sampleRate)
 
void SetValue (double newValue)
 
void SetMinValue (double minValue)
 
void ResetMinValue ()
 
void SetMaxValue (double maxValue)
 
void ResetMaxValue ()
 
double GetValue ()
 
wxString GetString ()
 
wxString GetFormatString ()
 
int GetFormatIndex ()
 
int GetNumBuiltins ()
 
wxString GetBuiltinName (const int index)
 
wxString GetBuiltinFormat (const int index)
 
wxString GetBuiltinFormat (const wxString &name)
 
void Adjust (int steps, int dir)
 
void Increment ()
 
void Decrement ()
 

Private Member Functions

void OnCaptureKey (wxCommandEvent &event)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnKeyUp (wxKeyEvent &event)
 
void OnMouse (wxMouseEvent &event)
 
void OnErase (wxEraseEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnFocus (wxFocusEvent &event)
 
void OnContext (wxContextMenuEvent &event)
 
void ValueToControls () override
 
void ControlsToValue () override
 
void UpdateAutoFocus ()
 
void Updated (bool keyup=false)
 

Private Attributes

bool mMenuEnabled
 
bool mReadOnly
 
std::unique_ptr< wxBitmap > mBackgroundBitmap
 
std::unique_ptr< wxFont > mDigitFont
 
std::unique_ptr< wxFont > mLabelFont
 
int mDigitBoxW
 
int mDigitBoxH
 
int mDigitW
 
int mDigitH
 
int mBorderLeft
 
int mBorderTop
 
int mBorderRight
 
int mBorderBottom
 
int mWidth
 
int mHeight
 
int mButtonWidth
 
int mLastField
 
bool mAutoPos
 
double mScrollRemainder
 
NumericConverter::Type mType
 
bool mAllowInvalidValue
 

Friends

class NumericTextCtrlAx
 

Additional Inherited Members

- Public Types inherited from NumericConverter
enum  Type { TIME, FREQUENCY, BANDWIDTH }
 
- Protected Attributes inherited from NumericConverter
Type mType
 
double mValue
 
double mMinValue
 
double mMaxValue
 
double mInvalidValue
 
wxString mFormatString
 
NumericFieldArray mFields
 
wxString mPrefix
 
wxString mValueTemplate
 
wxString mValueMask
 
wxString mValueString
 
double mScalingFactor
 
double mSampleRate
 
bool mNtscDrop
 
int mFocusedDigit
 
DigitInfoArray mDigits
 
const BuiltinFormatStringmBuiltinFormatStrings
 
int mNBuiltins
 
int mDefaultNdx
 

Constructor & Destructor Documentation

NumericTextCtrl::NumericTextCtrl ( NumericConverter::Type  type,
wxWindow *  parent,
wxWindowID  id,
const wxString &  formatName = wxEmptyString,
double  value = 0.0,
double  sampleRate = 44100,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
bool  autoPos = false 
)
NumericTextCtrl::~NumericTextCtrl ( )
virtual

Member Function Documentation

void NumericTextCtrl::ControlsToValue ( )
overrideprivatevirtual
void NumericTextCtrl::Fit ( )
override

References mButtonWidth, mHeight, and mWidth.

Referenced by EnableMenu(), SetFormatString(), and SetSampleRate().

int NumericTextCtrl::GetFocusedDigit ( )
inline
int NumericTextCtrl::GetFocusedField ( )
inline

References mLastField.

void NumericTextCtrl::OnCaptureKey ( wxCommandEvent &  event)
private
void NumericTextCtrl::OnErase ( wxEraseEvent &  event)
private
void NumericTextCtrl::OnFocus ( wxFocusEvent &  event)
private
void NumericTextCtrl::OnKeyUp ( wxKeyEvent &  event)
private

References Updated().

void NumericTextCtrl::OnMouse ( wxMouseEvent &  event)
private
void NumericTextCtrl::SetFieldFocus ( int  digit)
void NumericTextCtrl::SetInvalidValue ( double  invalidValue)
void NumericTextCtrl::SetReadOnly ( bool  readOnly = true)
void NumericTextCtrl::SetSampleRate ( double  sampleRate)
void NumericTextCtrl::UpdateAutoFocus ( )
private
void NumericTextCtrl::Updated ( bool  keyup = false)
private
void NumericTextCtrl::ValueToControls ( )
overrideprivatevirtual

Friends And Related Function Documentation

friend class NumericTextCtrlAx
friend

Member Data Documentation

bool NumericTextCtrl::mAllowInvalidValue
private

Referenced by OnKeyDown(), and SetInvalidValue().

bool NumericTextCtrl::mAutoPos
private

Referenced by UpdateAutoFocus().

std::unique_ptr<wxBitmap> NumericTextCtrl::mBackgroundBitmap
private

Referenced by Layout(), and OnPaint().

int NumericTextCtrl::mBorderBottom
private

Referenced by Layout().

int NumericTextCtrl::mBorderLeft
private

Referenced by Layout().

int NumericTextCtrl::mBorderRight
private

Referenced by Layout().

int NumericTextCtrl::mBorderTop
private

Referenced by Layout().

int NumericTextCtrl::mButtonWidth
private

Referenced by EnableMenu(), Fit(), and Layout().

int NumericTextCtrl::mDigitBoxH
private

Referenced by Layout(), and OnPaint().

int NumericTextCtrl::mDigitBoxW
private

Referenced by Layout(), and OnPaint().

std::unique_ptr<wxFont> NumericTextCtrl::mDigitFont
private

Referenced by Layout(), and OnPaint().

int NumericTextCtrl::mDigitH
private

Referenced by Layout(), and OnPaint().

int NumericTextCtrl::mDigitW
private

Referenced by Layout(), and OnPaint().

int NumericTextCtrl::mHeight
private

Referenced by Fit(), Layout(), and OnPaint().

std::unique_ptr<wxFont> NumericTextCtrl::mLabelFont
private

Referenced by Layout().

int NumericTextCtrl::mLastField
private

Referenced by GetFocusedField(), and SetFieldFocus().

bool NumericTextCtrl::mMenuEnabled
private

Referenced by EnableMenu(), Layout(), OnContext(), and OnMouse().

bool NumericTextCtrl::mReadOnly
private

Referenced by OnKeyDown(), OnMouse(), and SetReadOnly().

double NumericTextCtrl::mScrollRemainder
private

Referenced by OnMouse().

NumericConverter::Type NumericTextCtrl::mType
private

Referenced by OnContext().

int NumericTextCtrl::mWidth
private

Referenced by Fit(), Layout(), OnMouse(), and OnPaint().


The documentation for this class was generated from the following files: