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 128 of file LabelTrackView.h.

Constructor & Destructor Documentation

◆ Index() [1/2]

LabelTrackView::Index::Index ( )

Definition at line 49 of file LabelTrackView.cpp.

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

◆ Index() [2/2]

LabelTrackView::Index::Index ( int  index)

Definition at line 55 of file LabelTrackView.cpp.

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

Member Function Documentation

◆ IsModified()

bool LabelTrackView::Index::IsModified ( ) const

Definition at line 89 of file LabelTrackView.cpp.

90{
91 return mModified;
92}

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 84 of file LabelTrackView.cpp.

85{
86 return mIndex;
87}

◆ operator++()

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

Definition at line 70 of file LabelTrackView.cpp.

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

◆ operator--()

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

Definition at line 77 of file LabelTrackView.cpp.

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

◆ operator=()

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

Definition at line 61 of file LabelTrackView.cpp.

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

◆ SetModified()

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

Definition at line 94 of file LabelTrackView.cpp.

95{
96 mModified = modified;
97}

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 141 of file LabelTrackView.h.

◆ mModified

bool LabelTrackView::Index::mModified
private

Definition at line 142 of file LabelTrackView.h.


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