- 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
@@ -111,6 +111,9 @@ LookAndFeel_V2::LookAndFeel_V2()
TextPropertyComponent::textColourId, 0xff000000,
TextPropertyComponent::outlineColourId, standardOutlineColour,
BooleanPropertyComponent::backgroundColourId, 0xffffffff,
BooleanPropertyComponent::outlineColourId, standardOutlineColour,
ListBox::backgroundColourId, 0xffffffff,
ListBox::outlineColourId, standardOutlineColour,
ListBox::textColourId, 0xff000000,
@@ -238,24 +241,19 @@ void LookAndFeel_V2::drawButtonBackground (Graphics& g,
button.isConnectedOnBottom());
}
Font LookAndFeel_V2::getTextButtonFont (TextButton& button)
Font LookAndFeel_V2::getTextButtonFont (TextButton&, int buttonHeight)
{
return button.getFont();
return Font (jmin (15.0f, buttonHeight * 0.6f));
}
void LookAndFeel_V2::changeTextButtonWidthToFitText (TextButton& b, int newHeight)
int LookAndFeel_V2::getTextButtonWidthToFitText (TextButton& b, int buttonHeight)
{
if (newHeight >= 0)
b.setSize (jmax (1, b.getWidth()), newHeight);
else
newHeight = b.getHeight();
b.setSize (getTextButtonFont (b).getStringWidth (b.getButtonText()) + newHeight, newHeight);
return getTextButtonFont (b, buttonHeight).getStringWidth (b.getButtonText()) + buttonHeight;
}
void LookAndFeel_V2::drawButtonText (Graphics& g, TextButton& button, bool /*isMouseOverButton*/, bool /*isButtonDown*/)
{
Font font (getTextButtonFont (button));
Font font (getTextButtonFont (button, button.getHeight()));
g.setFont (font);
g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId
: TextButton::textColourOffId)
@@ -452,8 +450,7 @@ void LookAndFeel_V2::drawAlertBox (Graphics& g, AlertWindow& alert,
colour = alert.getAlertType() == AlertWindow::InfoIcon ? (uint32) 0x605555ff : (uint32) 0x40b69900;
character = alert.getAlertType() == AlertWindow::InfoIcon ? 'i' : '?';
icon.addEllipse ((float) iconRect.getX(), (float) iconRect.getY(),
(float) iconRect.getWidth(), (float) iconRect.getHeight());
icon.addEllipse (iconRect.toFloat());
}
GlyphArrangement ga;
@@ -1007,6 +1004,16 @@ void LookAndFeel_V2::drawPopupMenuItem (Graphics& g, const Rectangle<int>& area,
}
}
void LookAndFeel_V2::drawPopupMenuSectionHeader (Graphics& g, const Rectangle<int>& area, const String& sectionName)
{
g.setFont (getPopupMenuFont().boldened());
g.setColour (findColour (PopupMenu::headerTextColourId));
g.drawFittedText (sectionName,
area.getX() + 12, area.getY(), area.getWidth() - 16, (int) (area.getHeight() * 0.8f),
Justification::bottomLeft, 1);
}
//==============================================================================
int LookAndFeel_V2::getMenuWindowFlags()
{
@@ -1183,13 +1190,11 @@ void LookAndFeel_V2::drawLabel (Graphics& g, Label& label)
g.setColour (label.findColour (Label::textColourId).withMultipliedAlpha (alpha));
g.setFont (font);
g.drawFittedText (label.getText(),
label.getHorizontalBorderSize(),
label.getVerticalBorderSize(),
label.getWidth() - 2 * label.getHorizontalBorderSize(),
label.getHeight() - 2 * label.getVerticalBorderSize(),
label.getJustificationType(),
jmax (1, (int) (label.getHeight() / font.getHeight())),
Rectangle<int> textArea (label.getBorderSize().subtractedFrom (label.getLocalBounds()));
g.drawFittedText (label.getText(), textArea, label.getJustificationType(),
jmax (1, (int) (textArea.getHeight() / font.getHeight())),
label.getMinimumHorizontalScale());
g.setColour (label.findColour (Label::outlineColourId).withMultipliedAlpha (alpha));
@@ -2365,6 +2370,10 @@ void LookAndFeel_V2::drawCallOutBoxBackground (CallOutBox& box, Graphics& g,
g.strokePath (path, PathStrokeType (2.0f));
}
int LookAndFeel_V2::getCallOutBoxBorderSize (const CallOutBox&)
{
return 20;
}
//==============================================================================
AttributedString LookAndFeel_V2::createFileChooserHeaderText (const String& title,
@@ -39,16 +39,14 @@ public:
~LookAndFeel_V2();
//==============================================================================
void drawButtonBackground (Graphics&, Button& button, const Colour& backgroundColour,
void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
bool isMouseOverButton, bool isButtonDown) override;
Font getTextButtonFont (TextButton&, int buttonHeight) override;
Font getTextButtonFont (TextButton&) override;
void drawButtonText (Graphics&, TextButton&, bool isMouseOverButton, bool isButtonDown) override;
int getTextButtonWidthToFitText (TextButton&, int buttonHeight) override;
void drawButtonText (Graphics&, TextButton& button,
bool isMouseOverButton, bool isButtonDown) override;
void changeTextButtonWidthToFitText (TextButton&, int newHeight) override;
void drawToggleButton (Graphics&, ToggleButton& button, bool isMouseOverButton, bool isButtonDown) override;
void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) override;
void changeToggleButtonWidthToFitText (ToggleButton&) override;
@@ -78,17 +76,17 @@ public:
//==============================================================================
bool areScrollbarButtonsVisible() override;
void drawScrollbarButton (Graphics& g, ScrollBar&, int width, int height, int buttonDirection,
void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height, int buttonDirection,
bool isScrollbarVertical, bool isMouseOverButton, bool isButtonDown) override;
void drawScrollbar (Graphics& g, ScrollBar&, int x, int y, int width, int height,
void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,
bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
bool isMouseOver, bool isMouseDown) override;
ImageEffectFilter* getScrollbarEffect() override;
int getMinimumScrollbarThumbSize (ScrollBar&) override;
int getDefaultScrollbarWidth() override;
int getScrollbarButtonSize (ScrollBar& scrollbar) override;
int getScrollbarButtonSize (ScrollBar&) override;
//==============================================================================
Path getTickShape (float height) override;
@@ -139,6 +137,9 @@ public:
const String& text, const String& shortcutKeyText,
const Drawable* icon, const Colour* textColour) override;
void drawPopupMenuSectionHeader (Graphics&, const Rectangle<int>& area,
const String& sectionName) override;
Font getPopupMenuFont() override;
void drawPopupMenuUpDownArrow (Graphics&, int width, int height, bool isScrollUpArrow) override;
@@ -199,7 +200,7 @@ public:
//==============================================================================
Button* createFilenameComponentBrowseButton (const String& text) override;
void layoutFilenameComponent (FilenameComponent& filenameComp, ComboBox* filenameBox, Button* browseButton) override;
void layoutFilenameComponent (FilenameComponent&, ComboBox* filenameBox, Button* browseButton) override;
//==============================================================================
void drawConcertinaPanelHeader (Graphics&, const Rectangle<int>& area,
@@ -250,8 +251,8 @@ public:
void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) override;
void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) override;
void createTabButtonShape (TabBarButton&, Path& path, bool isMouseOver, bool isMouseDown) override;
void fillTabButtonShape (TabBarButton&, Graphics&, const Path& path, bool isMouseOver, bool isMouseDown) override;
void createTabButtonShape (TabBarButton&, Path&, bool isMouseOver, bool isMouseDown) override;
void fillTabButtonShape (TabBarButton&, Graphics&, const Path&, bool isMouseOver, bool isMouseDown) override;
Button* createTabBarExtrasButton() override;
@@ -287,11 +288,12 @@ public:
//==============================================================================
void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path& path, Image& cachedImage) override;
int getCallOutBoxBorderSize (const CallOutBox&) override;
//==============================================================================
void drawLevelMeter (Graphics&, int width, int height, float level) override;
void drawKeymapChangeButton (Graphics&, int width, int height, Button& button, const String& keyDescription) override;
void drawKeymapChangeButton (Graphics&, int width, int height, Button&, const String& keyDescription) override;
//==============================================================================
/** Draws a 3D raised (or indented) bevel using two colours.
@@ -318,15 +320,15 @@ public:
/** Utility function to draw a shiny, glassy circle (for round LED-type buttons). */
static void drawGlassSphere (Graphics&, float x, float y, float diameter,
const Colour& colour, float outlineThickness) noexcept;
const Colour&, float outlineThickness) noexcept;
static void drawGlassPointer (Graphics&, float x, float y, float diameter,
const Colour& colour, float outlineThickness, int direction) noexcept;
const Colour&, float outlineThickness, int direction) noexcept;
/** Utility function to draw a shiny, glassy oblong (for text buttons). */
static void drawGlassLozenge (Graphics&,
float x, float y, float width, float height,
const Colour& colour, float outlineThickness, float cornerSize,
const Colour&, float outlineThickness, float cornerSize,
bool flatOnLeft, bool flatOnRight, bool flatOnTop, bool flatOnBottom) noexcept;
private:
@@ -335,7 +337,7 @@ private:
void drawShinyButtonShape (Graphics&,
float x, float y, float w, float h, float maxCornerSize,
const Colour& baseColour, float strokeWidth,
const Colour&, float strokeWidth,
bool flatOnLeft, bool flatOnRight, bool flatOnTop, bool flatOnBottom) noexcept;
class GlassWindowButton;
@@ -30,8 +30,8 @@ LookAndFeel_V3::LookAndFeel_V3()
setColour (TextButton::buttonColourId, textButtonColour);
setColour (ComboBox::buttonColourId, textButtonColour);
setColour (TextEditor::outlineColourId, Colours::transparentBlack);
setColour (TabbedButtonBar::tabOutlineColourId, Colour (0xff999999));
setColour (TabbedComponent::outlineColourId, Colour (0xff999999));
setColour (TabbedButtonBar::tabOutlineColourId, Colour (0x66000000));
setColour (TabbedComponent::outlineColourId, Colour (0x66000000));
setColour (Slider::trackColourId, Colour (0xbbffffff));
setColour (Slider::thumbColourId, Colour (0xffddddff));
setColour (BubbleComponent::backgroundColourId, Colour (0xeeeeeedd));