![]() |
Audacity 3.2.0
|
AColor Manages color brushes and pens. More...
#include <AColor.h>
Public Types | |
enum | ColorGradientChoice { ColorGradientUnselected = 0 , ColorGradientTimeSelected , ColorGradientTimeAndFrequencySelected , ColorGradientEdge , ColorGradientTotal } |
Static Public Member Functions | |
static void | Init () |
static void | ReInit () |
static void | Arrow (wxDC &dc, wxCoord x, wxCoord y, int width, bool down=true) |
static void | Line (wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) |
static void | Lines (wxDC &dc, size_t nPoints, const wxPoint points[]) |
static void | DrawFocus (wxDC &dc, wxRect &r) |
static void | Bevel (wxDC &dc, bool up, const wxRect &r) |
static void | Bevel2 (wxDC &dc, bool up, const wxRect &r, bool bSel=false, bool bHighlight=false) |
static void | DrawHStretch (wxDC &dc, const wxRect &rect, wxBitmap &bitmap) |
static void | DrawFrame (wxDC &dc, const wxRect &r, wxBitmap &bitmap) |
static void | ButtonStretch (wxDC &dc, bool up, const wxRect &r, bool selected=false, bool highlight=false) |
Draw a button that fills a given rect. More... | |
static void | BevelTrackInfo (wxDC &dc, bool up, const wxRect &r, bool highlight=false) |
static wxColour | Blend (const wxColour &c1, const wxColour &c2) |
static void | UseThemeColour (wxDC *dc, int iBrush, int iPen=-1, int alpha=255) |
static void | UseThemeColour (wxGraphicsContext *gc, int iBrush, int iPen=-1, int alpha=255) |
static void | TrackPanelBackground (wxDC *dc, bool selected) |
static void | Light (wxDC *dc, bool selected, bool highlight=false) |
static void | Medium (wxDC *dc, bool selected) |
static void | MediumTrackInfo (wxDC *dc, bool selected) |
static void | Dark (wxDC *dc, bool selected, bool highlight=false) |
static void | CursorColor (wxDC *dc) |
static void | IndicatorColor (wxDC *dc, bool bIsNotRecording) |
static void | Mute (wxDC *dc, bool on, bool selected, bool soloing) |
static void | Solo (wxDC *dc, bool on, bool selected) |
static void | MIDIChannel (wxDC *dc, int channel) |
static void | LightMIDIChannel (wxDC *dc, int channel) |
static void | DarkMIDIChannel (wxDC *dc, int channel) |
static void | TrackFocusPen (wxDC *dc, int level) |
static void | SnapGuidePen (wxDC *dc) |
static void | PreComputeGradient () |
static void | ApplyUpdatedImages () |
Static Public Attributes | |
static wxBrush | lightBrush [2] |
static wxBrush | mediumBrush [2] |
static wxBrush | darkBrush [2] |
static wxPen | lightPen [2] |
static wxPen | mediumPen [2] |
static wxPen | darkPen [2] |
static wxPen | cursorPen |
static wxPen | indicatorPen [2] |
static wxBrush | indicatorBrush [2] |
static wxBrush | playRegionBrush [1] |
static wxBrush | muteBrush [2] |
static wxBrush | soloBrush |
static wxPen | clippingPen |
static wxPen | envelopePen |
static wxPen | WideEnvelopePen |
static wxBrush | envelopeBrush |
static wxBrush | labelTextNormalBrush |
static wxBrush | labelTextEditBrush |
static wxBrush | labelUnselectedBrush |
static wxBrush | labelSelectedBrush |
static wxBrush | labelSyncLockSelBrush |
static wxPen | labelUnselectedPen |
static wxPen | labelSelectedPen |
static wxPen | labelSyncLockSelPen |
static wxPen | labelSurroundPen |
static wxPen | trackFocusPens [3] |
static wxPen | snapGuidePen |
static wxPen | tooltipPen |
static wxBrush | tooltipBrush |
static bool | gradient_inited = 0 |
static const int | colorSchemes = 4 |
static const int | gradientSteps = 256 |
static unsigned char | gradient_pre [ColorGradientTotal][colorSchemes][gradientSteps][3] |
static wxPen | uglyPen |
static wxBrush | uglyBrush |
Static Private Attributes | |
static wxPen | sparePen |
static wxBrush | spareBrush |
static bool | inited = false |
AColor Manages color brushes and pens.
It is also a place to document colour usage policy in Audacity
Enumerator | |
---|---|
ColorGradientUnselected | |
ColorGradientTimeSelected | |
ColorGradientTimeAndFrequencySelected | |
ColorGradientEdge | |
ColorGradientTotal |
Definition at line 28 of file AColor.h.
|
static |
Definition at line 872 of file AColor.cpp.
References Observer::Publisher< Message, NotifyAll >::Publish(), ReInit(), and theTheme.
Referenced by ThemePrefs::Cancel(), GUIPrefs::Commit(), ThemePrefs::Commit(), ThemePrefs::OnLoadThemeCache(), ThemePrefs::OnLoadThemeComponents(), and ThemePrefs::OnReadThemeInternal().
|
static |
Definition at line 160 of file AColor.cpp.
Referenced by TrackInfo::CloseTitleDrawFunction(), NumericTextCtrl::Layout(), and TrackInfo::MinimizeSyncLockDrawFunction().
|
static |
Definition at line 266 of file AColor.cpp.
References Dark(), Light(), and Line().
Referenced by BevelTrackInfo(), Grabber::DrawGrabber(), NumericTextCtrl::Layout(), MixerBoard::LoadMusicalInstruments(), MixerTrackCluster::OnPaint(), MeterPanel::OnPaint(), cloud::ShareAudioToolbar::Repaint(), AudioSetupToolBar::Repaint(), and ControlToolBar::Repaint().
|
static |
Definition at line 294 of file AColor.cpp.
References ThemeBase::Bitmap(), anonymous_namespace{AColor.cpp}::GetButtonImageIndex(), min(), and theTheme.
Referenced by TrackInfo::CloseTitleDrawFunction(), TrackInfo::DrawCloseButton(), MixerBoard::MakeButtonBitmap(), TrackInfo::MinimizeSyncLockDrawFunction(), and anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 340 of file AColor.cpp.
References Bevel(), Blend(), ThemeBase::Colour(), theTheme, and uglyPen.
Referenced by WaveTrackVRulerControls::DoDraw(), AdornedRulerPanel::DoDrawEdge(), anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::Draw(), LabelTrackVRulerControls::Draw(), TimeTrackVRulerControls::Draw(), and CommonTrackControls::Draw().
|
static |
Definition at line 331 of file AColor.cpp.
Referenced by BevelTrackInfo().
|
static |
Draw a button that fills a given rect.
Definition at line 285 of file AColor.cpp.
References ThemeBase::Bitmap(), anonymous_namespace{AColor.cpp}::DrawNinePatch(), anonymous_namespace{AColor.cpp}::GetButtonImageIndex(), and theTheme.
Referenced by anonymous_namespace{PlayableTrackControls.cpp}::EffectsDrawFunction().
|
static |
Definition at line 463 of file AColor.cpp.
References cursorPen, Init(), and inited.
Referenced by anonymous_namespace{TrackPanel.cpp}::VRulersAndChannels::Draw(), and TrackArt::DrawCursor().
|
static |
Definition at line 443 of file AColor.cpp.
References darkBrush, darkPen, Init(), inited, uglyBrush, and uglyPen.
Referenced by Bevel(), Grabber::DrawGrabber(), anonymous_namespace{WaveformView.cpp}::DrawTimeSlider(), TrackInfo::MinimizeSyncLockDrawFunction(), ToolBarResizer::OnPaint(), ToolDock::OnPaint(), and TrackPanelBackground().
|
static |
Definition at line 699 of file AColor.cpp.
References AColor_midicolors.
Referenced by NoteTrack::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 235 of file AColor.cpp.
References UseThemeColour().
Referenced by KeyView::OnDrawBackground(), anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::OnPaint(), AButton::OnPaint(), ASlider::OnPaint(), ListNavigationPanel::OnPaint(), anonymous_namespace{RealtimeEffectPanel.cpp}::HyperLinkCtrlWrapper::OnPaint(), auStaticText::OnPaint(), and MeterPanel::OnPaint().
|
static |
Definition at line 325 of file AColor.cpp.
References anonymous_namespace{AColor.cpp}::DrawNinePatch().
Referenced by AButton::OnPaint().
|
static |
Definition at line 308 of file AColor.cpp.
References min().
Referenced by AButton::OnPaint().
|
static |
Definition at line 472 of file AColor.cpp.
References indicatorBrush, indicatorPen, Init(), and inited.
Referenced by AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), and PlayIndicatorOverlayBase::Draw().
|
static |
Definition at line 557 of file AColor.cpp.
References clippingPen, ThemeBase::Colour(), CursorColour(), cursorPen, darkBrush, darkPen, envelopeBrush, envelopePen, indicatorBrush, indicatorPen, inited, labelSelectedBrush, labelSelectedPen, labelSurroundPen, labelSyncLockSelBrush, labelSyncLockSelPen, labelTextEditBrush, labelTextNormalBrush, labelUnselectedBrush, labelUnselectedPen, lightBrush, lightPen, mediumBrush, mediumPen, muteBrush, playRegionBrush, ThemeBase::SetBrushColour(), ThemeBase::SetPenColour(), snapGuidePen, soloBrush, theTheme, tooltipBrush, tooltipPen, trackFocusPens, uglyBrush, uglyPen, and WideEnvelopePen.
Referenced by CursorColor(), Dark(), IndicatorColor(), Light(), Medium(), Mute(), AudacityApp::OnInit(), ReInit(), SnapGuidePen(), Solo(), TrackFocusPen(), and UseThemeColour().
|
static |
Definition at line 413 of file AColor.cpp.
References Init(), inited, lightBrush, lightPen, uglyBrush, and uglyPen.
Referenced by Bevel(), AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), Grabber::DrawGrabber(), and anonymous_namespace{WaveformView.cpp}::DrawTimeSlider().
|
static |
Definition at line 681 of file AColor.cpp.
References AColor_midicolors.
Referenced by NoteTrack::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 187 of file AColor.cpp.
References Lines().
Referenced by Bevel(), AdornedRulerPanel::DoDrawEdge(), AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), EditCursorOverlay::Draw(), PlayIndicatorOverlayBase::Draw(), LabelTrackView::Draw(), anonymous_namespace{TrackPanel.cpp}::VRulersAndChannels::Draw(), anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Draw(), TrackPanelResizerCell::Draw(), NoteTrackVRulerControls::Draw(), TrackVRulerControls::Draw(), Ruler::Draw(), SnapManager::Draw(), WaveTrackSubView::DrawBoldBoundaries(), TrackArt::DrawClipEdges(), TrackInfo::DrawCloseButton(), TrackArt::DrawCursor(), anonymous_namespace{WaveformView.cpp}::DrawEnvLine(), Grabber::DrawGrabber(), Ruler::DrawGrid(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), NoteTrack::DrawLabelControls(), LabelTrackView::DrawLines(), MeterPanel::DrawMeterBar(), anonymous_namespace{WaveformView.cpp}::DrawMinMaxRMS(), TrackArt::DrawNegativeOffsetTrackArrows(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), FrequencyPlotDialog::DrawPlot(), anonymous_namespace{WaveformView.cpp}::DrawTimeSlider(), LWSlider::DrawToBitmap(), anonymous_namespace{WaveformView.cpp}::DrawWaveformBackground(), KeyView::OnDrawBackground(), KeyView::OnDrawItem(), EqualizationPanel::OnPaint(), ExportMixerPanel::OnPaint(), ToolBarResizer::OnPaint(), ToolDock::OnPaint(), EffectAutoDuck::Panel::OnPaint(), EffectCompressorPanel::OnPaint(), EffectScienFilterPanel::OnPaint(), MeterPanel::OnPaint(), ToolFrame::OnPaint(), anonymous_namespace{Printing.cpp}::AudacityPrintout::OnPrintPage(), and FrequencyPlotDialog::PlotPaint().
|
static |
Definition at line 194 of file AColor.cpp.
Referenced by Line(), and EffectAutoDuck::Panel::OnPaint().
|
static |
Definition at line 424 of file AColor.cpp.
References Init(), inited, mediumBrush, and mediumPen.
Referenced by Grabber::DrawGrabber(), and MediumTrackInfo().
|
static |
Definition at line 433 of file AColor.cpp.
References Medium(), and UseThemeColour().
Referenced by TrackPanelResizerCell::Draw(), CommonTrackControls::Draw(), TrackVRulerControls::Draw(), anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction(), and MixerTrackCluster::OnPaint().
|
static |
Definition at line 665 of file AColor.cpp.
References AColor_midicolors.
Referenced by NoteTrack::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 495 of file AColor.cpp.
References Init(), inited, mediumBrush, and muteBrush.
Referenced by anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 721 of file AColor.cpp.
References ColorGradientEdge, ColorGradientTimeAndFrequencySelected, ColorGradientTimeSelected, ColorGradientTotal, ColorGradientUnselected, ThemeBase::Colour(), freqSelColormap, gradient_inited, gradient_pre, gradientSteps, selColormap, specColormap, and theTheme.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), and ReInit().
|
static |
Definition at line 527 of file AColor.cpp.
References gradient_inited, Init(), inited, and PreComputeGradient().
Referenced by ApplyUpdatedImages().
|
static |
Definition at line 488 of file AColor.cpp.
References Init(), inited, and snapGuidePen.
Referenced by AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), and SnapManager::Draw().
|
static |
Definition at line 510 of file AColor.cpp.
References Init(), inited, mediumBrush, and soloBrush.
Referenced by anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 481 of file AColor.cpp.
References Init(), inited, and trackFocusPens.
Referenced by anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Draw().
|
static |
Definition at line 454 of file AColor.cpp.
References Dark(), and UseThemeColour().
Referenced by anonymous_namespace{TrackPanel.cpp}::EmptyCell::Draw(), TrackPanelResizerCell::Draw(), and BackgroundCell::Draw().
|
static |
Definition at line 372 of file AColor.cpp.
References ThemeBase::Colour(), Init(), inited, spareBrush, sparePen, and theTheme.
Referenced by AdornedRulerPanel::DoDrawBackground(), anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::Draw(), TrackArt::DrawClipAffordance(), TrackArt::DrawClipEdges(), TrackArt::DrawClipFolded(), DrawFocus(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), LWSlider::DrawToBitmap(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), MixerBoard::MakeButtonBitmap(), MediumTrackInfo(), and TrackPanelBackground().
|
static |
Definition at line 392 of file AColor.cpp.
References ThemeBase::Colour(), Init(), inited, spareBrush, sparePen, and theTheme.
|
static |
Definition at line 136 of file AColor.h.
Referenced by SpectrogramSettings::GetColorSchemeNames().
|
static |
Definition at line 104 of file AColor.h.
Referenced by CursorColor(), and Init().
|
static |
|
static |
|
static |
Definition at line 117 of file AColor.h.
Referenced by EnvelopeEditor::DrawPoints(), Init(), and ExportMixerPanel::OnPaint().
|
static |
Definition at line 115 of file AColor.h.
Referenced by anonymous_namespace{WaveformView.cpp}::DrawEnvelope(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), EnvelopeEditor::DrawPoints(), Init(), and EffectAutoDuck::Panel::OnPaint().
|
static |
Definition at line 135 of file AColor.h.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), PreComputeGradient(), and ReInit().
|
static |
Definition at line 138 of file AColor.h.
Referenced by GetColorGradient(), and PreComputeGradient().
|
static |
Definition at line 137 of file AColor.h.
Referenced by GetColorGradient(), and PreComputeGradient().
|
static |
Definition at line 106 of file AColor.h.
Referenced by IndicatorColor(), and Init().
|
static |
Definition at line 105 of file AColor.h.
Referenced by IndicatorColor(), and Init().
|
staticprivate |
Definition at line 147 of file AColor.h.
Referenced by CursorColor(), Dark(), IndicatorColor(), Init(), Light(), Medium(), Mute(), ReInit(), SnapGuidePen(), Solo(), TrackFocusPen(), and UseThemeColour().
|
static |
Definition at line 122 of file AColor.h.
Referenced by LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), NoteTrackView::Draw(), and Init().
|
static |
|
static |
Definition at line 127 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
|
static |
|
static |
Definition at line 120 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
Definition at line 119 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
Definition at line 121 of file AColor.h.
Referenced by LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), NoteTrackView::Draw(), and Init().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 108 of file AColor.h.
Referenced by Init(), and ExportMixerPanel::OnPaint().
|
static |
Definition at line 130 of file AColor.h.
Referenced by Init(), and SnapGuidePen().
|
static |
|
staticprivate |
Definition at line 146 of file AColor.h.
Referenced by UseThemeColour().
|
staticprivate |
Definition at line 145 of file AColor.h.
Referenced by UseThemeColour().
|
static |
Definition at line 133 of file AColor.h.
Referenced by Init(), and TipWindow::OnPaint().
|
static |
Definition at line 132 of file AColor.h.
Referenced by Init(), and TipWindow::OnPaint().
|
static |
Definition at line 129 of file AColor.h.
Referenced by Init(), and TrackFocusPen().
|
static |
Definition at line 142 of file AColor.h.
Referenced by Dark(), LabelTrackView::Draw(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), anonymous_namespace{WaveformView.cpp}::DrawWaveformBackground(), Init(), and Light().
|
static |
Definition at line 141 of file AColor.h.
Referenced by BevelTrackInfo(), Dark(), NoteTrackVRulerControls::Draw(), WaveTrackSubView::DrawBoldBoundaries(), anonymous_namespace{WaveformView.cpp}::DrawEnvelope(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), EnvelopeEditor::DrawPoints(), Init(), and Light().
|
static |
Definition at line 116 of file AColor.h.
Referenced by Init(), and EffectCompressorPanel::OnPaint().