Audacity  3.0.3
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 126 of file LabelTrackView.h.

Constructor & Destructor Documentation

◆ Index() [1/2]

LabelTrackView::Index::Index ( )

Definition at line 47 of file LabelTrackView.cpp.

48 : mIndex(-1),
49  mModified(false)
50 {
51 }

◆ Index() [2/2]

LabelTrackView::Index::Index ( int  index)

Definition at line 53 of file LabelTrackView.cpp.

54 : mIndex(index),
55  mModified(false)
56 {
57 }

Member Function Documentation

◆ IsModified()

bool LabelTrackView::Index::IsModified ( ) const

Definition at line 87 of file LabelTrackView.cpp.

88 {
89  return mModified;
90 }

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

83 {
84  return mIndex;
85 }

◆ operator++()

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

Definition at line 68 of file LabelTrackView.cpp.

69 {
70  mModified = false;
71  mIndex += 1;
72  return *this;
73 }

◆ operator--()

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

Definition at line 75 of file LabelTrackView.cpp.

76 {
77  mModified = false;
78  mIndex -= 1;
79  return *this;
80 }

◆ operator=()

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

Definition at line 59 of file LabelTrackView.cpp.

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

◆ SetModified()

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

Definition at line 92 of file LabelTrackView.cpp.

93 {
94  mModified = modified;
95 }

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

◆ mModified

bool LabelTrackView::Index::mModified
private

Definition at line 140 of file LabelTrackView.h.


The documentation for this struct was generated from the following files:
LabelTrackView::Index::mModified
bool mModified
Definition: LabelTrackView.h:140
LabelTrackView::Index::mIndex
int mIndex
Definition: LabelTrackView.h:139