Audacity 3.2.0
Classes | Functions
anonymous_namespace{CellularPanel.cpp} Namespace Reference

Classes

struct  Adaptor
 
class  DefaultRightButtonHandler
 

Functions

wxRect Subdivide (const wxRect &rect, bool divideX, const TrackPanelGroup::Refinement &children, const TrackPanelGroup::Refinement::const_iterator iter)
 

Function Documentation

◆ Subdivide()

wxRect anonymous_namespace{CellularPanel.cpp}::Subdivide ( const wxRect &  rect,
bool  divideX,
const TrackPanelGroup::Refinement children,
const TrackPanelGroup::Refinement::const_iterator  iter 
)

Definition at line 1084 of file CellularPanel.cpp.

1088 {
1089 const auto next = iter + 1;
1090 const auto end = children.end();
1091 wxCoord nextCoord;
1092 if (next == end)
1093 nextCoord = std::max( iter->first,
1094 divideX ? rect.GetRight() : rect.GetBottom() );
1095 else
1096 nextCoord = next->first - 1;
1097
1098 auto lesser = iter->first;
1099 auto greater = nextCoord;
1100
1101 auto result = rect;
1102 if (divideX)
1103 result.SetLeft(lesser), result.SetRight(greater);
1104 else
1105 result.SetTop(lesser), result.SetBottom(greater);
1106
1107 return result;
1108 };
const char * end(const char *str) noexcept
Definition: StringUtils.h:106

References details::end().

Referenced by CellularPanel::FindCell(), and CellularPanel::Visit().

Here is the call graph for this function:
Here is the caller graph for this function: