Audacity 3.2.0
|
A cursor for iterating the theme bitmap. More...
#include <Theme.h>
Public Member Functions | |
FlowPacker (int width) | |
~FlowPacker () | |
void | GetNextPosition (int xSize, int ySize) |
void | SetNewGroup (int iGroupSize) |
void | SetColourGroup () |
wxRect | Rect () |
wxRect | RectInner () |
void | RectMid (int &x, int &y) |
Public Attributes | |
int | mFlags = resFlagPaired |
int | mxPos = 0 |
int | myPos = 0 |
int | myHeight = 0 |
int | mBorderWidth = 1 |
Private Attributes | |
int | iImageGroupSize = 1 |
int | iImageGroupIndex = -1 |
int | mOldFlags = resFlagPaired |
int | myPosBase = 0 |
int | mxCacheWidth = 0 |
int | mComponentWidth = 0 |
int | mComponentHeight = 0 |
A cursor for iterating the theme bitmap.
Packs rectangular boxes into a rectangle, using simple first fit.
This class is currently used by Theme to pack its images into the image cache. Perhaps someday we will improve FlowPacker and make it more flexible, and use it for toolbar and window layouts too.
|
explicit |
Definition at line 411 of file Theme.cpp.
References SetNewGroup().
void FlowPacker::GetNextPosition | ( | int | xSize, |
int | ySize | ||
) |
Definition at line 438 of file Theme.cpp.
References iImageGroupIndex, iImageGroupSize, mBorderWidth, mComponentHeight, mComponentWidth, mFlags, mOldFlags, mxCacheWidth, mxPos, myHeight, myPos, myPosBase, resFlagPaired, resFlagSkip, and SetNewGroup().
wxRect FlowPacker::Rect | ( | ) |
Definition at line 470 of file Theme.cpp.
References mComponentHeight, mComponentWidth, mxPos, and myPos.
Referenced by RectInner().
wxRect FlowPacker::RectInner | ( | ) |
Definition at line 475 of file Theme.cpp.
References mBorderWidth, and Rect().
void FlowPacker::RectMid | ( | int & | x, |
int & | y | ||
) |
Definition at line 480 of file Theme.cpp.
References mComponentHeight, mComponentWidth, mxPos, and myPos.
void FlowPacker::SetColourGroup | ( | ) |
Definition at line 427 of file Theme.cpp.
References iImageGroupIndex, iImageGroupSize, mComponentWidth, mFlags, mOldFlags, mxPos, myHeight, and myPosBase.
void FlowPacker::SetNewGroup | ( | int | iGroupSize | ) |
Definition at line 417 of file Theme.cpp.
References iImageGroupIndex, iImageGroupSize, mComponentWidth, mFlags, mOldFlags, mxPos, myHeight, and myPosBase.
Referenced by FlowPacker(), and GetNextPosition().
|
private |
Definition at line 90 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().
|
private |
Definition at line 89 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().
int FlowPacker::mBorderWidth = 1 |
Definition at line 86 of file Theme.h.
Referenced by GetNextPosition(), and RectInner().
|
private |
Definition at line 96 of file Theme.h.
Referenced by GetNextPosition(), Rect(), and RectMid().
|
private |
Definition at line 95 of file Theme.h.
Referenced by GetNextPosition(), Rect(), RectMid(), SetColourGroup(), and SetNewGroup().
int FlowPacker::mFlags = resFlagPaired |
Definition at line 82 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().
|
private |
Definition at line 91 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().
|
private |
Definition at line 93 of file Theme.h.
Referenced by GetNextPosition().
int FlowPacker::mxPos = 0 |
Definition at line 83 of file Theme.h.
Referenced by GetNextPosition(), Rect(), RectMid(), SetColourGroup(), and SetNewGroup().
int FlowPacker::myHeight = 0 |
Definition at line 85 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().
int FlowPacker::myPos = 0 |
Definition at line 84 of file Theme.h.
Referenced by GetNextPosition(), Rect(), and RectMid().
|
private |
Definition at line 92 of file Theme.h.
Referenced by GetNextPosition(), SetColourGroup(), and SetNewGroup().