Audacity  3.0.3
Functions | Variables
AColor.cpp File Reference
#include "AColor.h"
#include "AColorResources.h"
#include <wx/colour.h>
#include <wx/dc.h>
#include <wx/dcmemory.h>
#include <wx/graphics.h>
#include <wx/settings.h>
#include <wx/utils.h>
#include "AllThemeResources.h"
#include "Theme.h"
Include dependency graph for AColor.cpp:

Go to the source code of this file.

Functions

wxColour InvertOfColour (const wxColour &c)
 
wxColour CursorColour ()
 

Variables

const int AColor_midicolors [16][3]
 

Function Documentation

◆ CursorColour()

wxColour CursorColour ( )

Definition at line 450 of file AColor.cpp.

451 {
452  wxColour cCursor = theTheme.Colour( clrCursorPen );
453  wxColour cBack = theTheme.Colour( clrMedium );
454 
455  int d = theTheme.ColourDistance( cCursor, cBack );
456 
457  // Pen colour is fine, if there is plenty of contrast.
458  if( d > 200 )
459  return theTheme.Colour( clrCursorPen );
460 
461  // otherwise return same colour as a selection.
462  return theTheme.Colour( clrSelected );
463 }

References ThemeBase::Colour(), ThemeBase::ColourDistance(), and theTheme.

Referenced by AColor::Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InvertOfColour()

wxColour InvertOfColour ( const wxColour &  c)

Definition at line 443 of file AColor.cpp.

444 {
445  return wxColour( 255-c.Red(), 255-c.Green(), 255-c.Blue() );
446 }

Variable Documentation

◆ AColor_midicolors

const int AColor_midicolors[16][3]
Initial value:
= {
{255, 102, 102},
{204, 0, 0},
{255, 117, 23},
{255, 255, 0},
{0, 204, 0},
{0, 204, 204},
{125, 125, 255},
{153, 0, 255},
{140, 97, 54},
{120, 120, 120},
{255, 175, 40},
{102, 255, 102},
{153, 255, 255},
{190, 190, 255},
{204, 102, 255},
{255, 51, 204}
}

Definition at line 553 of file AColor.cpp.

Referenced by AColor::DarkMIDIChannel(), AColor::LightMIDIChannel(), and AColor::MIDIChannel().

ThemeBase::ColourDistance
int ColourDistance(wxColour &From, wxColour &To)
Definition: Theme.cpp:292
theTheme
THEME_API Theme theTheme
Definition: Theme.cpp:79
ThemeBase::Colour
wxColour & Colour(int iIndex)
Definition: Theme.cpp:1189