1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-25 15:34:10 +02:00

Label text coordinate calculations don't need a window

This commit is contained in:
Paul Licameli
2016-06-23 14:39:14 -04:00
parent f01fc64a2d
commit 7a7379c6fc
4 changed files with 15 additions and 10 deletions

View File

@@ -215,8 +215,9 @@ class AUDACITY_DLL_API LabelTrack final : public Track
//This deletes the label at given index.
void DeleteLabel(int index);
//get current cursor position
bool CalcCursorX(wxWindow * parent, int * x);
//get current cursor position,
// relative to the left edge of the track panel
bool CalcCursorX(int * x) const;
void MayAdjustLabel( int iLabel, int iEdge, bool bAllowSwapping, double fNewTime);
void MayMoveLabel( int iLabel, int iEdge, double fNewTime);
@@ -280,7 +281,7 @@ class AUDACITY_DLL_API LabelTrack final : public Track
void ComputeLayout(const wxRect & r, const ZoomInfo &zoomInfo) const;
void ComputeTextPosition(const wxRect & r, int index) const;
void SetCurrentCursorPosition(wxDC & dc, int xPos) const;
void SetCurrentCursorPosition(int xPos) const;
void calculateFontHeight(wxDC & dc) const;
void RemoveSelectedText();