Audacity 3.2.0
Namespaces | 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.

Namespaces

namespace  anonymous_namespace{AColor.cpp}
 

Functions

void anonymous_namespace{AColor.cpp}::DrawNinePatch (wxDC &dc, wxBitmap &bitmap, const wxRect &r, int mid=1)
 
int anonymous_namespace{AColor.cpp}::GetButtonImageIndex (bool up, bool selected, bool highlight)
 
wxColour InvertOfColour (const wxColour &c)
 
wxColour CursorColour ()
 

Variables

const int AColor_midicolors [16][3]
 

Function Documentation

◆ CursorColour()

wxColour CursorColour ( )

Definition at line 516 of file AColor.cpp.

517{
518 wxColour cCursor = theTheme.Colour( clrCursorPen );
519 wxColour cBack = theTheme.Colour( clrMedium );
520
521 int d = theTheme.ColourDistance( cCursor, cBack );
522
523 // Pen colour is fine, if there is plenty of contrast.
524 if( d > 200 )
525 return theTheme.Colour( clrCursorPen );
526
527 // otherwise return same colour as a selection.
528 return theTheme.Colour( clrSelected );
529}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxColour & Colour(int iIndex)
int ColourDistance(wxColour &From, wxColour &To)
Definition: Theme.cpp:285

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 509 of file AColor.cpp.

510{
511 return wxColour( 255-c.Red(), 255-c.Green(), 255-c.Blue() );
512}

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 614 of file AColor.cpp.

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