MCPcopy Create free account
hub / github.com/audacity/audacity / GetLocation

Method GetLocation

src/widgets/NumericTextCtrl.cpp:1096–1112  ·  view source on GitHub ↗

Returns the rectangle for this object (id = 0) or a child element (id > 0). rect is in screen coordinates.

Source from the content-addressed store, hash-verified

1094// Returns the rectangle for this object (id = 0) or a child element (id > 0).
1095// rect is in screen coordinates.
1096wxAccStatus NumericTextCtrlAx::GetLocation(wxRect & rect, int elementId)
1097{
1098 if ((elementId != wxACC_SELF) &&
1099 // We subtract 1, below, and need to avoid neg index to mDigits.
1100 (elementId > 0))
1101 {
1102 rect = mCtrl->GetBox(elementId - 1);
1103 rect.SetPosition(mCtrl->ClientToScreen(rect.GetPosition()));
1104 }
1105 else
1106 {
1107 rect = mCtrl->GetRect();
1108 rect.SetPosition(mCtrl->GetParent()->ClientToScreen(rect.GetPosition()));
1109 }
1110
1111 return wxACC_OK;
1112}
1113
1114static void GetFraction( const FormatterContext& context, wxString &label, NumericConverterType type,
1115 const NumericFormatID &formatSymbol )

Callers

nothing calls this directly

Calls 3

GetBoxMethod · 0.80
SetPositionMethod · 0.80
GetParentMethod · 0.45

Tested by

no test coverage detected