You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dexed/Source/DXLookNFeel.h

64 lines
2.8 KiB

11 years ago
/**
*
9 years ago
* Copyright (c) 2013-2016 Pascal Gauthier.
11 years ago
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
11 years ago
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
11 years ago
*
*/
#ifndef DXLOOKNFEEL_H_INCLUDED
#define DXLOOKNFEEL_H_INCLUDED
#include "../JuceLibraryCode/JuceHeader.h"
11 years ago
class DXLookNFeel : public LookAndFeel_V3 {
10 years ago
static CriticalSection lock;
static DXLookNFeel *ins;
DXLookNFeel();
HashMap<String, int> colourMap;
11 years ago
public:
10 years ago
Typeface::Ptr defaultFont;
Typeface::Ptr defaultFontBold;
10 years ago
Image imageKnob, imageSwitch, imageButton, imageSlider, imageScaling, imageLight, imageLFO;
9 years ago
Image imageSwitchOperator;
10 years ago
Image imageOperator, imageGlobal;
10 years ago
10 years ago
/* overriden methods */
virtual void drawRotarySlider(Graphics &g, int x, int y, int width, int height, float sliderPosProportional, float rotaryStartAngle, float rotaryEndAngle, Slider &slider ) override;
virtual void drawToggleButton(Graphics& g, ToggleButton& button, bool isMouseOverButton, bool isButtonDown) override;
10 years ago
virtual void drawLinearSliderBackground (Graphics&, int x, int y, int width, int height,
float sliderPos, float minSliderPos, float maxSliderPos,
const Slider::SliderStyle, Slider&) override;
virtual void drawLinearSliderThumb (Graphics&, int x, int y, int width, int height,
float sliderPos, float minSliderPos, float maxSliderPos,
const Slider::SliderStyle, Slider&) override;
virtual void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
bool isMouseOverButton, bool isButtonDown) override;
10 years ago
virtual Font getTextButtonFont(TextButton&, int buttonHeight) override;
virtual Typeface::Ptr getTypefaceForFont(const Font &) override;
virtual void positionComboBoxText (ComboBox& box, Label& label) override;
10 years ago
static DXLookNFeel *getLookAndFeel();
static Colour fillColour;
static Colour lightBackground;
static Colour background;
static Colour roundBackground;
11 years ago
};
#endif // DXLOOKNFEEL_H_INCLUDED