Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
LabelTrackView::Index Struct Reference

Public Member Functions

 Index ()
 
 Index (int index)
 
 operator int () const
 
Indexoperator= (int index)
 
Indexoperator++ ()
 
Indexoperator-- ()
 
bool IsModified () const
 
void SetModified (bool modified)
 

Private Attributes

int mIndex
 
bool mModified
 

Detailed Description

Definition at line 129 of file LabelTrackView.h.

Constructor & Destructor Documentation

◆ Index() [1/2]

LabelTrackView::Index::Index ( )

Definition at line 50 of file LabelTrackView.cpp.

51: mIndex(-1),
52 mModified(false)
53{
54}

◆ Index() [2/2]

LabelTrackView::Index::Index ( int  index)

Definition at line 56 of file LabelTrackView.cpp.

57: mIndex(index),
58 mModified(false)
59{
60}

Member Function Documentation

◆ IsModified()

bool LabelTrackView::Index::IsModified ( ) const

Definition at line 90 of file LabelTrackView.cpp.

91{
92 return mModified;
93}

Referenced by LabelTrackView::Char(), LabelTrackView::CutSelectedText(), LabelTrackView::DoKeyDown(), LabelTrackView::KeyDown(), LabelTrackView::OnContextMenu(), and LabelTrackView::PasteSelectedText().

Here is the caller graph for this function:

◆ operator int()

LabelTrackView::Index::operator int ( ) const

Definition at line 85 of file LabelTrackView.cpp.

86{
87 return mIndex;
88}

◆ operator++()

LabelTrackView::Index & LabelTrackView::Index::operator++ ( )

Definition at line 71 of file LabelTrackView.cpp.

72{
73 mModified = false;
74 mIndex += 1;
75 return *this;
76}

◆ operator--()

LabelTrackView::Index & LabelTrackView::Index::operator-- ( )

Definition at line 78 of file LabelTrackView.cpp.

79{
80 mModified = false;
81 mIndex -= 1;
82 return *this;
83}

◆ operator=()

LabelTrackView::Index & LabelTrackView::Index::operator= ( int  index)

Definition at line 62 of file LabelTrackView.cpp.

63{
64 if (index != mIndex) {
65 mModified = false;
66 }
67 mIndex = index;
68 return *this;
69}

◆ SetModified()

void LabelTrackView::Index::SetModified ( bool  modified)

Definition at line 95 of file LabelTrackView.cpp.

96{
97 mModified = modified;
98}

Referenced by LabelTrackView::Char(), LabelTrackView::CutSelectedText(), LabelTrackView::KeyDown(), and LabelTrackView::PasteSelectedText().

Here is the caller graph for this function:

Member Data Documentation

◆ mIndex

int LabelTrackView::Index::mIndex
private

Definition at line 142 of file LabelTrackView.h.

◆ mModified

bool LabelTrackView::Index::mModified
private

Definition at line 143 of file LabelTrackView.h.


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