- Library code update

- project update (added Eigen)

git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@94 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-12-20 20:59:48 +00:00
parent 1b4d8e9f54
commit dc5560392f
312 changed files with 6349 additions and 4195 deletions
@@ -25,8 +25,7 @@
class ComponentAnimator::AnimationTask
{
public:
AnimationTask (Component* const comp)
: component (comp)
AnimationTask (Component* const comp) noexcept : component (comp)
{
}
@@ -34,7 +33,7 @@ public:
float finalAlpha,
int millisecondsToSpendMoving,
bool useProxyComponent,
double startSpeed_, double endSpeed_)
double startSpd, double endSpd)
{
msElapsed = 0;
msTotal = jmax (1, millisecondsToSpendMoving);
@@ -51,10 +50,10 @@ public:
bottom = component->getBottom();
alpha = component->getAlpha();
const double invTotalDistance = 4.0 / (startSpeed_ + endSpeed_ + 2.0);
startSpeed = jmax (0.0, startSpeed_ * invTotalDistance);
const double invTotalDistance = 4.0 / (startSpd + endSpd + 2.0);
startSpeed = jmax (0.0, startSpd * invTotalDistance);
midSpeed = invTotalDistance;
endSpeed = jmax (0.0, endSpeed_ * invTotalDistance);
endSpeed = jmax (0.0, endSpd * invTotalDistance);
if (useProxyComponent)
proxy = new ProxyComponent (*component);
@@ -218,7 +217,7 @@ void ComponentAnimator::animateComponent (Component* const component,
const double endSpeed)
{
// the speeds must be 0 or greater!
jassert (startSpeed >= 0 && endSpeed >= 0)
jassert (startSpeed >= 0 && endSpeed >= 0);
if (component != nullptr)
{
@@ -148,10 +148,10 @@ public:
private:
//==============================================================================
class AnimationTask;
OwnedArray <AnimationTask> tasks;
OwnedArray<AnimationTask> tasks;
uint32 lastTime;
AnimationTask* findTaskFor (Component* component) const noexcept;
AnimationTask* findTaskFor (Component*) const noexcept;
void timerCallback();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentAnimator)
@@ -238,7 +238,7 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree
const int numExistingChildComps = parent.getNumChildComponents();
Array <Component*> componentsInOrder;
Array<Component*> componentsInOrder;
componentsInOrder.ensureStorageAllocated (numExistingChildComps);
{
@@ -226,7 +226,7 @@ public:
private:
//=============================================================================
OwnedArray <TypeHandler> types;
OwnedArray<TypeHandler> types;
ScopedPointer<Component> component;
ImageProvider* imageProvider;
#if JUCE_DEBUG
@@ -287,7 +287,7 @@ void TabbedButtonBar::setTabName (const int tabIndex, const String& newName)
}
}
void TabbedButtonBar::removeTab (const int tabIndex)
void TabbedButtonBar::removeTab (const int tabIndex, const bool animate)
{
const int oldIndex = currentTabIndex;
if (tabIndex == currentTabIndex)
@@ -296,7 +296,7 @@ void TabbedButtonBar::removeTab (const int tabIndex)
tabs.remove (tabIndex);
setCurrentTabIndex (oldIndex);
resized();
updateTabPositions (animate);
}
void TabbedButtonBar::moveTab (const int currentIndex, const int newIndex, const bool animate)
@@ -212,7 +212,7 @@ public:
void setTabName (int tabIndex, const String& newName);
/** Gets rid of one of the tabs. */
void removeTab (int tabIndex);
void removeTab (int tabIndex, bool animate = false);
/** Moves a tab to a new index in the list.
Pass -1 as the index to move it to the end of the list.
@@ -346,15 +346,15 @@ void Viewport::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& whe
Component::mouseWheelMove (e, wheel);
}
static float rescaleMouseWheelDistance (float distance, int singleStepSize) noexcept
static int rescaleMouseWheelDistance (float distance, int singleStepSize) noexcept
{
if (distance == 0)
return 0;
distance *= 14.0f * singleStepSize;
return distance < 0 ? jmin (distance, -1.0f)
: jmax (distance, 1.0f);
return roundToInt (distance < 0 ? jmin (distance, -1.0f)
: jmax (distance, 1.0f));
}
bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, const MouseWheelDetails& wheel)
@@ -366,26 +366,23 @@ bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, const MouseWheelD
if (canScrollHorz || canScrollVert)
{
float wheelIncrementX = rescaleMouseWheelDistance (wheel.deltaX, singleStepX);
float wheelIncrementY = rescaleMouseWheelDistance (wheel.deltaY, singleStepY);
const int deltaX = rescaleMouseWheelDistance (wheel.deltaX, singleStepX);
const int deltaY = rescaleMouseWheelDistance (wheel.deltaY, singleStepY);
Point<int> pos (getViewPosition());
if (wheelIncrementX != 0 && wheelIncrementY != 0 && canScrollHorz && canScrollVert)
if (deltaX != 0 && deltaY != 0 && canScrollHorz && canScrollVert)
{
pos.setX (pos.x - roundToInt (wheelIncrementX));
pos.setY (pos.y - roundToInt (wheelIncrementY));
pos.x -= deltaX;
pos.y -= deltaY;
}
else if (canScrollHorz && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! canScrollVert))
else if (canScrollHorz && (deltaX != 0 || e.mods.isShiftDown() || ! canScrollVert))
{
if (wheelIncrementX == 0 && ! canScrollVert)
wheelIncrementX = wheelIncrementY;
pos.setX (pos.x - roundToInt (wheelIncrementX));
pos.x -= deltaX != 0 ? deltaX : deltaY;
}
else if (canScrollVert && wheelIncrementY != 0)
else if (canScrollVert && deltaY != 0)
{
pos.setY (pos.y - roundToInt (wheelIncrementY));
pos.y -= deltaY;
}
if (pos != getViewPosition())