//============================================================================== MLProgressBar::MLProgressBar (MLWidget* pContainer) : MLWidget(pContainer) { MLWidget::setComponent(this); MLLookAndFeel* myLookAndFeel = (&(getRootViewResources(this).mLookAndFeel)); setOpaque(myLookAndFeel->getDefaultOpacity()); setBufferedToImage(myLookAndFeel->getDefaultBufferMode()); setPaintingIsUnclipped(myLookAndFeel->getDefaultUnclippedMode()); setInterceptsMouseClicks(false, false); }
//============================================================================== MLPanel::MLPanel () { MLWidget::setComponent(this); MLLookAndFeel* myLookAndFeel = MLLookAndFeel::getInstance(); setOpaque(myLookAndFeel->getDefaultOpacity()); setBufferedToImage(myLookAndFeel->getDefaultBufferMode()); setPaintingIsUnclipped(myLookAndFeel->getDefaultUnclippedMode()); setColour (backgroundColourId, findColour(MLLookAndFeel::backgroundColor)); setColour (foregroundColourId, findColour(MLLookAndFeel::markColor)); setInterceptsMouseClicks(false, false); }
MLEnvelope::MLEnvelope (MLWidget* pC) : MLWidget(pC) { MLWidget::setComponent(this); MLLookAndFeel* myLookAndFeel = (&(getRootViewResources(this).mLookAndFeel)); setOpaque(myLookAndFeel->getDefaultOpacity()); setBufferedToImage(myLookAndFeel->getDefaultBufferMode()); setPaintingIsUnclipped(myLookAndFeel->getDefaultUnclippedMode()); mDARMode = false; setColour (foregroundColor, findColour(MLLookAndFeel::labelColor)); setRepaintsOnMouseActivity (false); }
MLDrawing::MLDrawing(MLWidget* pContainer) : MLWidget(pContainer) { MLWidget::setComponent(this); MLLookAndFeel* myLookAndFeel = (&(getRootViewResources(this).mLookAndFeel)); setOpaque(myLookAndFeel->getDefaultOpacity()); setBufferedToImage(myLookAndFeel->getDefaultBufferMode()); setPaintingIsUnclipped(myLookAndFeel->getDefaultUnclippedMode()); // setup component setRepaintsOnMouseActivity (false); setInterceptsMouseClicks(false, false); // set default drawing state mLineThickness = 1.0f; mDarkColor = mLineColor = myLookAndFeel->findColour(MLLookAndFeel::darkLabelColor); mLightColor = myLookAndFeel->findColour(MLLookAndFeel::lightLabelColor); }
MLMultiSlider::MLMultiSlider (MLWidget* pContainer) : MLWidget(pContainer), mVertical(true), isMouseWheelMoving(false), mGestureInProgress(false) { mpTimer = std::unique_ptr<GestureTimer>(new GestureTimer(this)); MLWidget::setComponent(this); MLLookAndFeel* myLookAndFeel = (&(getRootViewResources(this).mLookAndFeel)); setOpaque(myLookAndFeel->getDefaultOpacity()); setBufferedToImage(myLookAndFeel->getDefaultBufferMode()); setPaintingIsUnclipped(myLookAndFeel->getDefaultUnclippedMode()); setNumSliders(1); setRange(0., 1., 0.01); mSliderUnderMouse = -1; mCurrDragSlider = -1; mCurrDragValue = 0.f; mDoRollover = 0; }