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 | Line (wxDC &dc, const wxPoint &from, const wxPoint &to) |
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, int mid) |
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 | 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 841 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 167 of file AColor.cpp.
Referenced by NumericTextCtrl::Layout().
|
static |
Definition at line 278 of file AColor.cpp.
References Dark(), and Line().
Referenced by BevelTrackInfo(), MixerBoard::LoadMusicalInstruments(), and MixerTrackCluster::OnPaint().
|
static |
Definition at line 298 of file AColor.cpp.
References ThemeBase::Bitmap(), anonymous_namespace{AColor.cpp}::GetButtonImageIndex(), min(), and theTheme.
Referenced by CommonTrackInfo::DrawCloseButton(), MixerBoard::MakeButtonBitmap(), and anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 344 of file AColor.cpp.
References Bevel().
|
static |
Definition at line 335 of file AColor.cpp.
|
static |
Draw a button that fills a given rect.
Definition at line 289 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 437 of file AColor.cpp.
References cursorPen, Init(), and inited.
Referenced by anonymous_namespace{TrackPanel.cpp}::VRulersAndChannels::Draw(), and TrackArt::DrawCursor().
|
static |
Definition at line 421 of file AColor.cpp.
References darkBrush, darkPen, Init(), inited, uglyBrush, and uglyPen.
Referenced by Bevel(), anonymous_namespace{TrackPanel.cpp}::ChannelStack::Draw(), TrackPanelResizerCell::Draw(), anonymous_namespace{WaveformView.cpp}::DrawTimeSlider(), ToolBarResizer::OnPaint(), and ToolDock::OnPaint().
|
static |
Definition at line 668 of file AColor.cpp.
References AColor_midicolors.
Referenced by anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 247 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 329 of file AColor.cpp.
References anonymous_namespace{AColor.cpp}::DrawNinePatch().
Referenced by anonymous_namespace{CommonTrackInfo.cpp}::DrawToolButtonBackground(), and AButton::OnPaint().
|
static |
Definition at line 312 of file AColor.cpp.
References min().
Referenced by AButton::OnPaint().
|
static |
Definition at line 446 of file AColor.cpp.
References indicatorBrush, indicatorPen, Init(), and inited.
Referenced by AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), and PlayIndicatorOverlayBase::Draw().
|
static |
Definition at line 531 of file AColor.cpp.
References clippingPen, ThemeBase::Colour(), CursorColour(), cursorPen, darkBrush, darkPen, envelopeBrush, envelopePen, indicatorBrush, indicatorPen, inited, labelSelectedBrush, labelSurroundPen, labelSyncLockSelBrush, labelSyncLockSelPen, labelTextEditBrush, labelTextNormalBrush, labelUnselectedBrush, 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 395 of file AColor.cpp.
References Init(), inited, lightBrush, lightPen, uglyBrush, and uglyPen.
Referenced by AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), Grabber::DrawGrabber(), and anonymous_namespace{WaveformView.cpp}::DrawTimeSlider().
|
static |
Definition at line 650 of file AColor.cpp.
References AColor_midicolors.
Referenced by anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 200 of file AColor.cpp.
References Line().
|
static |
Definition at line 194 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}::ChannelStack::Draw(), anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Draw(), TrackPanelResizerCell::Draw(), NoteTrackVRulerControls::Draw(), Ruler::Draw(), WaveChannelSubView::DrawBoldBoundaries(), TrackArt::DrawClipEdges(), TrackArt::DrawCursor(), anonymous_namespace{WaveformView.cpp}::DrawEnvLine(), Ruler::DrawGrid(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), anonymous_namespace{WaveformView.cpp}::DrawIndividualSamples(), anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), LabelTrackView::DrawLines(), MeterPanel::DrawMeterBar(), TrackArt::DrawNegativeOffsetTrackArrows(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), FrequencyPlotDialog::DrawPlot(), TrackArt::DrawSnapLines(), anonymous_namespace{WaveformView.cpp}::DrawTimeSlider(), LWSlider::DrawToBitmap(), anonymous_namespace{WaveformView.cpp}::DrawWaveformBackground(), Line(), KeyView::OnDrawBackground(), KeyView::OnDrawItem(), EqualizationPanel::OnPaint(), ExportMixerPanel::OnPaint(), ToolBarResizer::OnPaint(), ToolDock::OnPaint(), EffectAutoDuck::Panel::OnPaint(), EffectLegacyCompressorPanel::OnPaint(), EffectScienFilterPanel::OnPaint(), MeterPanel::OnPaint(), ToolFrame::OnPaint(), and FrequencyPlotDialog::PlotPaint().
|
static |
Definition at line 206 of file AColor.cpp.
Referenced by Line(), and EffectAutoDuck::Panel::OnPaint().
|
static |
Definition at line 406 of file AColor.cpp.
References Init(), inited, mediumBrush, and mediumPen.
Referenced by Grabber::DrawGrabber().
|
static |
Definition at line 415 of file AColor.cpp.
References UseThemeColour().
Referenced by anonymous_namespace{TrackPanel.cpp}::ChannelStack::Draw(), CommonTrackControls::Draw(), anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction(), and MixerTrackCluster::OnPaint().
|
static |
Definition at line 634 of file AColor.cpp.
References AColor_midicolors.
Referenced by anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), and anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack().
|
static |
Definition at line 469 of file AColor.cpp.
References Init(), inited, mediumBrush, and muteBrush.
Referenced by anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 690 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 501 of file AColor.cpp.
References gradient_inited, Init(), inited, and PreComputeGradient().
Referenced by ApplyUpdatedImages().
|
static |
Definition at line 462 of file AColor.cpp.
References Init(), inited, and snapGuidePen.
Referenced by AdornedRulerPanel::TrackPanelGuidelineOverlay::Draw(), and TrackArt::DrawSnapLines().
|
static |
Definition at line 484 of file AColor.cpp.
References Init(), inited, mediumBrush, and soloBrush.
Referenced by anonymous_namespace{PlayableTrackControls.cpp}::MuteOrSoloDrawFunction().
|
static |
Definition at line 455 of file AColor.cpp.
References Init(), inited, and trackFocusPens.
Referenced by anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Draw().
|
static |
Definition at line 432 of file AColor.cpp.
References UseThemeColour().
Referenced by anonymous_namespace{TrackPanel.cpp}::EmptyCell::Draw(), TrackPanelResizerCell::Draw(), and BackgroundCell::Draw().
|
static |
Definition at line 354 of file AColor.cpp.
References ThemeBase::Colour(), Init(), inited, spareBrush, sparePen, and theTheme.
Referenced by AdornedRulerPanel::DoDrawBackground(), TrackArt::DrawClipAffordance(), TrackArt::DrawClipEdges(), TrackArt::DrawClipFolded(), DrawFocus(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), LWSlider::DrawToBitmap(), MixerBoard::MakeButtonBitmap(), MediumTrackInfo(), and TrackPanelBackground().
|
static |
Definition at line 374 of file AColor.cpp.
References ThemeBase::Colour(), Init(), inited, spareBrush, sparePen, and theTheme.
|
static |
Definition at line 105 of file AColor.h.
Referenced by CursorColor(), and Init().
|
static |
|
static |
Definition at line 103 of file AColor.h.
Referenced by Dark(), Init(), and MeterPanel::OnPaint().
|
static |
Definition at line 118 of file AColor.h.
Referenced by EnvelopeEditor::DrawPoints(), Init(), and ExportMixerPanel::OnPaint().
|
static |
Definition at line 116 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 134 of file AColor.h.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), PreComputeGradient(), and ReInit().
|
static |
Definition at line 137 of file AColor.h.
Referenced by GetColorGradient(), and PreComputeGradient().
|
static |
Definition at line 136 of file AColor.h.
Referenced by GetColorGradient(), and PreComputeGradient().
|
static |
Definition at line 107 of file AColor.h.
Referenced by IndicatorColor(), and Init().
|
static |
Definition at line 106 of file AColor.h.
Referenced by IndicatorColor(), and Init().
|
staticprivate |
Definition at line 146 of file AColor.h.
Referenced by CursorColor(), Dark(), IndicatorColor(), Init(), Light(), Medium(), Mute(), ReInit(), SnapGuidePen(), Solo(), TrackFocusPen(), and UseThemeColour().
|
static |
Definition at line 123 of file AColor.h.
Referenced by LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), NoteTrackView::Draw(), and Init().
|
static |
Definition at line 126 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
|
static |
|
static |
Definition at line 121 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
Definition at line 120 of file AColor.h.
Referenced by LabelTrackView::Draw(), and Init().
|
static |
Definition at line 122 of file AColor.h.
Referenced by LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), NoteTrackView::Draw(), and Init().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 109 of file AColor.h.
Referenced by Init(), and ExportMixerPanel::OnPaint().
|
static |
Definition at line 129 of file AColor.h.
Referenced by Init(), and SnapGuidePen().
|
static |
|
staticprivate |
Definition at line 145 of file AColor.h.
Referenced by UseThemeColour().
|
staticprivate |
Definition at line 144 of file AColor.h.
Referenced by UseThemeColour().
|
static |
Definition at line 132 of file AColor.h.
Referenced by Init(), and TipWindow::OnPaint().
|
static |
Definition at line 131 of file AColor.h.
Referenced by Init(), and TipWindow::OnPaint().
|
static |
Definition at line 128 of file AColor.h.
Referenced by Init(), and TrackFocusPen().
|
static |
Definition at line 141 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 140 of file AColor.h.
Referenced by Dark(), NoteTrackVRulerControls::Draw(), WaveChannelSubView::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 117 of file AColor.h.
Referenced by Init(), and EffectLegacyCompressorPanel::OnPaint().